Commit Graph

212 Commits

Author SHA1 Message Date
Henri Sivonen
78a66d15e6 Bug 1719674 - Make packed_simd compile with Rust 1.54. r=glandium
Cherry-pick upstream commits
58ba720df8
728d47506f
to update the shuffle API for const generics and to remove the unnecessary `const_fn`
feature gate.

Differential Revision: https://phabricator.services.mozilla.com/D119538
2021-07-15 08:42:08 +00:00
M. Sirringhaus
086d5c7b45 Bug 1714465 - Add ThreadNamesStream support to minidump_writer_linux. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D117154
2021-06-30 15:03:52 +00:00
Henri Sivonen
b5366f5a31 Bug 1716709 - Remove RUSTC_BOOTSTRAP for xmldecl. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D117980
2021-06-17 06:44:25 +00:00
Mike Hommey
4665615833 Bug 1716518 - Upgrade crossbeam-related crates to newer releases. r=emilio
crossbeam-channel to v0.5.1
crossbeam-deque to v0.7.3
crossbeam-epoch to v0.8.2
crossbeam-utils to v0.6.6, v0.7.2, and v0.8.5

autocfg 0.1.6 ends up removed because nothing uses it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D117750
2021-06-15 20:39:43 +00:00
Deian Stefan
ba18513783 Bug 1710685 - Part 1: Update RLBox lucetc to fix clock() on mac r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D116544
2021-06-08 17:40:21 +00:00
Henri Sivonen
bd9a21c236 Bug 1706862 - Make chardetng detect half-width katakana. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D115209
2021-05-31 11:52:17 +00:00
Yury Delendik
986df9d9d5 Bug 1712634 - Update cranelift to version 0.74. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D115845
2021-05-25 17:38:20 +00:00
Csoregi Natalia
b40f2c7919 Backed out 2 changesets (bug 1710685) for causing build bustage. CLOSED TREE
Backed out changeset 52b5058cff53 (bug 1710685)
Backed out changeset 0693e56e6e85 (bug 1710685)
2021-05-18 19:41:33 +03:00
Deian Stefan
00baae6102 Bug 1710685 - Part 1: Update RLBox lucetc to fix clock() on mac r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D114923
2021-05-18 15:25:00 +00:00
M. Sirringhaus
cca1566127 Bug 1710099 - Update the minidump_writer_linux crate to replace the unmaintained memmap crate. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D114728
2021-05-10 13:00:45 +00:00
Yury Delendik
50fe06fce0 Bug 1706427 - Update wasmparser and cranelift. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D112806
2021-05-04 14:59:40 +00:00
Mike Hommey
d674f870ce Bug 1709237 - Upgrade the failure crate to 0.1.8. r=emilio
Replace the use of a third-party github repo with a in-tree patch.

Differential Revision: https://phabricator.services.mozilla.com/D114191
2021-05-04 02:22:45 +00:00
Mike Hommey
64db9121c0 Bug 1708634 - Hack mio so that it depends on winapi 0.3 and miow 0.3. r=emilio
Ultimately, we'd want to upgrade to mio 0.7, but that's much more
involved.

Differential Revision: https://phabricator.services.mozilla.com/D113919
2021-04-30 09:17:56 +00:00
M. Sirringhaus
024220247f Bug 1706033 - Fix potential crash with out-of-bounds indexing r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D112554
2021-04-21 08:33:29 +00:00
Henri Sivonen
822fc2ac55 Bug 1702246 - Make the encoding detector tolerate extensions to legacy CJK encodings. r=emk
This patch tries to address the issue that legacy CJK extensions have various
extended variants where the core of the encoding is compatible but the edges
are incompatible. Without this patch, we reject e.g. Big5 if it has a single
character from the UAO extension or a single Windows end-user-defined character.

Likewise for the other legacy CJK encodings.

This patch tolerates:

* All Big5 extensions (the motivating part of this patch).
* Windows EUDC for EUC-KR.
* Classic Mac OS extensions to Shift_JIS, EUC-KR, GBK, and Big5 to the
  extent practical considering conflicting definitions of what constitutes
  a lead byte in the Encoding Standard but a single-byte extension in
  Classic Mac OS.
* JIS X 0213 / 2004 extensions to Shift_JIS and EUC-JP. (It's unclear if
  these have actual deployment.)

Tolerating means that the occurrence of an extension character doesn't
disqualify a candidate but only applies a penalty to the pending score.
If there is enough other convincing content, it should be able to overcome
the penalty.

Differential Revision: https://phabricator.services.mozilla.com/D111372
2021-04-13 13:14:35 +00:00
M. Sirringhaus
02ec742536 Bug 1676109 - Remove font and cache mappings from the Linux minidumps r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D99338
2021-04-12 20:58:08 +00:00
Gabriele Svelto
277338b229 Bug 1682509 - Add a Windows Error Reporting exception module capable of writing out crash reports r=dmajor
This is a minimal implementation of a WER exception module that can intercept
crashes of Firefox processes and write out a fully formed crash report, that is
a minidump, an .extra file containing the minimum annotations required by
Socorro and an event file.

The module in and by itself is not functional: an entry needs to be added to
the registry and the processes which want to be monitored need to register it
at runtime. With this patch applied it will only be built but it won't be
packaged with Firefox nor it will be used when doing local development.

The module implementation has a few notable properties:

* We use an empty C++ shim (mozwer) to build the module DLL. This is
  because the build system doesn't support building DLLs directly from Rust.
* The actual implementation is written in Rust (mozwer-rust) and exposes the
  callbacks that will be invoked by the WER service.
* We use the winapi crate to access Windows native functionality but given it
  is missing some bits (including upstream!) we declare them in our crate for
  the time being.
* The minidump uses the same options we use in Firefox and should be of
  similar size. I manually tested different type of crashes including
  __fastail() ones and they're all reliably captured.
* The .extra file contains only the annotations that are strictly required for
  submitting the crash to crash-stats.mozilla.org. More should be added in the
  future. The existing annotations are all extracted from within the module
  code because we have no way to access the ones that were stored in Firefox'
  crashed processes (nor should we, since we hope to catch crashes that happen
  even before Firefox sets up crash reporting internally).
* The module does not distinguish between main process and content process
  crashes at the moment. This will need to be implemented when we hook it up
  with the crash reporting code within Firefox.
* We use libc's time() function to get the crash time in order to be consistent
  with what the regular exception handler does.

Differential Revision: https://phabricator.services.mozilla.com/D101708
2021-04-07 07:55:23 +00:00
Henri Sivonen
b98488aa92 Bug 673087 - Honor encoding declared via XML declaration in text/html. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D107806
2021-03-23 09:52:04 +00:00
Jeff Muizelaar
3c8ae4c16e Bug 1698295 - Build glsl with opt-level=2 to improve build times. r=glandium
This changes reduces the time spent in swgl shader translation
from 24s to 12s.

Differential Revision: https://phabricator.services.mozilla.com/D108327
2021-03-16 14:28:07 +00:00
M. Sirringhaus
bcaf9b7cc1 Bug 1695646 - minidump_writer_linux mapping merge logic wrong r=gsvelto
The logic missed a pair of brackets, leading to memory regions
being merged that shouldn't have been merged (anonymous regions
with access flags set getting merged into the previous mapping)

Differential Revision: https://phabricator.services.mozilla.com/D106772
2021-03-05 13:32:27 +00:00
Dzmitry Malyshau
27e5308381 Bug 1622846 - Update WebGPU API with wgpu r=jgilbert,webidl,smaug
This is another WebGPU API update, it picks up a lot of changes that were made recently:
  - new bind group layout
  - new render pipeline descriptor
  - new vertex formats
  - limits
  - compressed texture formats
  - index format
  - query sets
  - and more small ones!

It also brings in the updated `gfx/wgpu` to support these API changes.

Differential Revision: https://phabricator.services.mozilla.com/D107013
2021-03-04 21:25:46 +00:00
Brindusan Cristian
cae8a0ef30 Backed out changeset 0c0c723b0a0e (bug 1622846) for build bustages in Device.h. CLOSED TREE 2021-03-04 22:02:58 +02:00
Dzmitry Malyshau
65199ec16a Bug 1622846 - Update WebGPU API with wgpu r=jgilbert,webidl,smaug
This is another WebGPU API update, it picks up a lot of changes that were made recently:
  - new bind group layout
  - new render pipeline descriptor
  - new vertex formats
  - limits
  - compressed texture formats
  - index format
  - query sets
  - and more small ones!

It also brings in the updated `gfx/wgpu` to support these API changes.

Differential Revision: https://phabricator.services.mozilla.com/D107013
2021-03-04 17:48:28 +00:00
Mike Hommey
39a14165d0 Bug 1694318 - Remove the mozjs_sys rust crate. r=jandem
The mozjs_sys crate is actually responsible for all the problems
encountered with the js crate we just removed, but the sm-mozjs-crate
task that builds and runs tests for it doesn't fail because... there is
actually no test to build and run, so all it builds is a static library,
which doesn't expose all the problems that exist.

The content of this crate in mozilla-central is also outdated compared
to servo upstream.

Differential Revision: https://phabricator.services.mozilla.com/D106390
2021-03-02 08:09:35 +00:00
Mike Hommey
93e7a214c2 Bug 1694318 - Remove the js rust crate. r=jandem,sheehan
The sm-rust-bindings task that builds and runs tests for it actually only
doesn't fail by three(!) distinct happenstances of chance:
- It somehow doesn't hit a race condition that can happen, but that
  attempting to change the build process for jsglue.cpp did,
- The second call to `cargo test` without `--feature debugmozjs` only
  works because nothing was cleaned up from the first and the second
  build uses artifacts from the first that are otherwise not there if
  only running the second.
- The addition of rust code to spidermonkey (the jsrust crate in
  js/src/rust) somehow didsn't cause problems in the current
  configuration, but in other configurations (which fixing the second
  thing above unveils) the build fails because of the multiple
  definition of rust_eh_personality between the jsrust staticlib and the
  rust stdlib that rustc links to test programs.

On top of all the above, the content of the crate in mozilla-central
has not received updates from upstream servo in years, and doesn't
reflect what servo actually uses.

Differential Revision: https://phabricator.services.mozilla.com/D106389
2021-03-02 08:09:35 +00:00
Matthew Gregan
2220e66486 Bug 1693270 - Switch audioipc-2 to vendored code - remove old linting paths. a=lint-fix
CLOSED TREE

Build fix - remove obsolete media/audioipc path from linting exclusions.

Differential Revision: https://phabricator.services.mozilla.com/D105510
2021-02-17 20:40:57 +00:00
M. Sirringhaus
1f377765b0 Bug 1666733 - Add error reporting to minidump generation (Linux) r=gsvelto
Linux only, as part of the oxidization effort (Bug 1620993) of breakpad.

Differential Revision: https://phabricator.services.mozilla.com/D103895
2021-02-10 10:05:37 +00:00
M. Sirringhaus
d4644353c1 Bug 1666733 - Rebase to latest upstream changes (ARM specific, which is still deactivated) r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D104537
2021-02-10 10:05:36 +00:00
Julian Seward
c757334be6 Bug 1689950 - Vendor in CL a25399760e9f12b679aa267dd2af7cfedc72bb71. Part 1: hash changes. r=yury.
Revendor CL to a25399760e9f12b679aa267dd2af7cfedc72bb71 from
https://github.com/mozilla-spidermonkey/wasmtime, branch firefox85.
This pulls in three code-correctness fixes that have accumulated in
the past month:
https://github.com/bytecodealliance/wasmtime/pull/{2548,2556,2559}.

Differential Revision: https://phabricator.services.mozilla.com/D103672
2021-02-01 16:18:47 +00:00
M. Sirringhaus
5d4a325c23 Bug 1688882 - Always inform the main process that a minidump has been generated, even if it's incomplete r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D103041
2021-01-28 14:17:34 +00:00
Henri Sivonen
9b210c311e Bug 1686463 - Gather telemetry about automatic encoding detection outcomes. r=chutten,emk
Differential Revision: https://phabricator.services.mozilla.com/D102397
2021-01-24 00:11:07 +00:00
Mike Hommey
dbc3d9867f Bug 1685697 - Hide the rustc output from autocfg. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101861
2021-01-15 12:19:13 +00:00
Mike Hommey
e4bf32e4f8 Bug 1686888 - Stop building dump_syms. r=gsvelto
Now that we use an external dump_syms, we don't need to build
breakpad's.

This means we also don't need the dump_syms_rust_demangle crate anymore.

Differential Revision: https://phabricator.services.mozilla.com/D101865
2021-01-15 10:31:48 +00:00
M. Sirringhaus
5299ba12e6 Bug 1620993 - Rewrite the Linux-specific minidump writer code in Rust r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D98744
2021-01-14 11:01:59 +00:00
Razvan Maries
21321565f6 Backed out changeset 9fabf5ced4d3 (bug 1620993) for OSX Build bustages. CLOSED TREE 2021-01-13 12:57:41 +02:00
M. Sirringhaus
3665b8d70a Bug 1620993 - Rewrite the Linux-specific minidump writer code in Rust r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D98744
2021-01-13 10:37:29 +00:00
Emilio Cobos Álvarez
3bd15f9e8e Bug 1684261 - Fix build with rust nightly. r=jrmuizel
Fixes errors like:

  dependency (nix) specification is ambiguous. Only one of `branch`, `tag` or `rev` is allowed.

I've left the most specific dependency, but for wgpu the rev is not
right, so I've kept the branch which effectively preserves behavior.

Differential Revision: https://phabricator.services.mozilla.com/D100485
2020-12-26 18:16:05 +00:00
Adam Gashlin
f949e155a3 Bug 1681574: Remove the old update agent skeleton. r=nalexander
I'm keeping the --enable-update-agent config option and the corresponding
MOZ_UPDATE_AGENT config flag and define, as these should still be useful.

As we never shipped this there is no need to keep anything around to
clean up the scheduled tasks.

Differential Revision: https://phabricator.services.mozilla.com/D99574
2020-12-15 19:00:25 +00:00
Julian Seward
7564a2282f Bug 1681485 - Revendor Cranelift to 3334d92350da40b90d2529c147db3ea44918b558. r=lth.
Revendor Cranelift to 3334d92350da40b90d2529c147db3ea44918b558
from https://github.com/mozilla-spidermonkey/wasmtime branch firefox85.
The (only) purpose is to pull in this fix for an apparently rare but serious
LICM bug:

Fix missing modification of jump table in LICM.
See https://github.com/bytecodealliance/wasmtime/pull/1697

Differential Revision: https://phabricator.services.mozilla.com/D99230
2020-12-10 06:51:48 +00:00
shravanrn@gmail.com
d475a75904 Bug 1670878: Instantiating a large number of wasm library sandboxes crashes due to overuse of file descriptors r=tjr
Instantiating a wasm library duplicates a file descriptor for /dev/null 3 times to be used as input, output and error streams for the wasm sandboxed code. When a lot of sandboxes are created and destroyed, a lot of descriptors are duplicated and closed. While this should be fine, POSIX does not seem to happy with the opening and closing of many file descriptors --- this could perhaps be some strange interaction with Firefox's seccomp filters and cross-process file descriptor handling as it is difficult to repro this outside of firefox.

However, the simpler fix here was to just eliminate the duplication of /dev/null and return an error when input, output or error streams are accessed by wasm sandboxed code. This means calls to printf will fail, but no code I know off actually checks the int error code returned by printf and this change is certainly compatible with existing sandboxed components.

Differential Revision: https://phabricator.services.mozilla.com/D99160
2020-12-09 21:54:03 +00:00
Julian Seward
7e62d43bab Bug 1681450 - Revendor Cranelift to 3b01b4b850bafb981a04383198c0b50d041dc5ef. r=lth.
Revendor Cranelift to 3b01b4b850bafb981a04383198c0b50d041dc5ef
from https://github.com/mozilla-spidermonkey/wasmtime branch firefox85.
The (only) purpose is to pull in this:

commit 31bac3eafbfda8f1ffb504cdeb75505d48537336
Merge: 93c199363 34d9931ed
Author: Nick Fitzgerald <fitzgen@gmail.com>
Date: Wed Nov 25 13:09:05 2020 -0800

Merge pull request #2450 from bytecodealliance/cfallin/fix-wasm-reachable

Fix Wasm translator bug: end of toplevel frame is branched-to only for fallthrough returns.

Differential Revision: https://phabricator.services.mozilla.com/D99204
2020-12-09 12:05:52 +00:00
Julian Seward
5638b306c1 Bug 1678785 - AddressSanitizer: SEGV [@ vixl::Memory::Read]. r=lth.
Differential Revision: https://phabricator.services.mozilla.com/D98932
2020-12-07 16:26:17 +00:00
Julian Seward
f082e74406 Bug 1680509 - Vendor in CL ac58a436ed84d1a88b4ff24367c5972cf8d3d405. Part 1: hash and API changes. r=yury.
Revendor CL to ac58a436ed84d1a88b4ff24367c5972cf8d3d405 from
https://github.com/mozilla-spidermonkey/wasmtime, branch firefox85.

This pulls in a version of our private wasmtime tree that properly refers to
our private versions of the regalloc.rs and wasm-tools trees, also at
https://github.com/mozilla-spidermonkey.  With this patch in place, we will be
decoupled from upstream commits to wasmtime, wasm-tools (wasmparser), and
regalloc.rs.

Differential Revision: https://phabricator.services.mozilla.com/D98647
2020-12-03 20:01:22 +00:00
Emilio Cobos Álvarez
04229a0075 Bug 1680080 - Optimize proc macros / build dependencies. r=glandium,firefox-build-system-reviewers,mhentges
On a very parallel debug build, I see a long time just waiting for
bindgen / style compilation / geckoservo.

Turns out that a bunch of this is just proc macros / build scripts.

Optimizing it saves between 10 and 17 seconds of my debug build. We
might want to consider running bindgen much like cbindgen rather than
rebuilding it all the time, which should help a lot more, but my guess
is that this should still help with the pretty hot custom derives that
the style crate runs.

This needs rust 1.41, so the requirement for tools/crashreporter needs
to be bumped as a consequence. To make things simpler, it was bumped
to 1.47 while we're at it.

Differential Revision: https://phabricator.services.mozilla.com/D98366
2020-12-04 01:35:51 +00:00
Henri Sivonen
c55405f18e Bug 1678175 - Avoid detecting windows-1252 euro sign as GBK. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D98005
2020-11-29 08:07:45 +00:00
Julian Seward
f28cf588c0 Bug 1677452 - Update Cranelift to firefox85 / dcc52ba3f69d3de7cdbd787b936825d9c61e3c27 and wasmparser to 0.67: Part 1 - hash and API changes. r=lth.
This updates the relevant CL and wasmparser versions:

* wasmparser 0.67

* Cranelift/wasmtime to dcc52ba3f69d3de7cdbd787b936825d9c61e3c27
  on branch firefox85 at https://github.com/mozilla-spidermonkey/wasmtime

It also includes the following changes needed to track CL/wasmparser ABI changes:

* test suite: track improvements to validation-failure expected outputs.

* wasm/cranelift/src/bindings/mod.rs, ModuleEnvironment::signature: track
  CL-side changes towards module-linking support.

* wasm/cranelift/src/wasm2clif.rs: FuncEnvironment::translate_memory_copy:
  track CL-side changes for supporting multiple memories.

Differential Revision: https://phabricator.services.mozilla.com/D97587
2020-11-19 18:50:12 +00:00
Dzmitry Malyshau
f9116a751d Bug 1622846 - Serialize WebGPU descriptors via Serde for IPC r=jgilbert,webidl,smaug
This PR updates wgpu to the latest and changes the way we pass object descriptors to the GPU process.
Instead of trying to convert them between DOM-CPP-IPDL-FFI-Rust, we now do DOM-FFI-Rust
and serialize them by serde into ipc::ByteBuf objects.

Differential Revision: https://phabricator.services.mozilla.com/D94908
2020-11-07 02:43:09 +00:00
Csoregi Natalia
1a3ae2644d Backed out changeset bdd3d7eb5927 (bug 1622846) for linux bustage on gfx/wgpu/wgpu-types/src/lib.rs. CLOSED TREE 2020-11-07 00:48:50 +02:00
Dzmitry Malyshau
505438ed91 Bug 1622846 - Serialize WebGPU descriptors via Serde for IPC r=jgilbert,webidl,smaug
This PR updates wgpu to the latest and changes the way we pass object descriptors to the GPU process.
Instead of trying to convert them between DOM-CPP-IPDL-FFI-Rust, we now do DOM-FFI-Rust
and serialize them by serde into ipc::ByteBuf objects.

Differential Revision: https://phabricator.services.mozilla.com/D94908
2020-11-06 18:59:27 +00:00
Henri Sivonen
33c996c701 Bug 1667736 - Update packed_simd to compile on Rust 1.48. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D91572
2020-10-30 08:29:53 +00:00