Closed
Bug 1956768
Opened 1 year ago
Closed 1 year ago
Possible optimization bug in WasmGC implementation of Firefox
Categories
(Core :: JavaScript: WebAssembly, defect, P1)
Tracking
()
RESOLVED
FIXED
139 Branch
| Tracking | Status | |
|---|---|---|
| firefox139 | --- | fixed |
People
(Reporter: kustermann.martin, Assigned: rhunt)
References
Details
(Keywords: pernosco)
Attachments
(2 files)
Steps to reproduce:
Using firefox shell to run a WasmGC program
```% third_party/firefox_jsshell/js --version
JavaScript-C136.0
% third_party/firefox_jsshell/js $PWD/pkg/dart2wasm/bin/run_wasm.js $PWD/out.O4.mjs $PWD/out.O4.wasm
This program runs a benchmark for somewhat more than 2 seconds and prints the results
See the attached files for reproduction (I didn't include the jsshell binaries as those are big and should be available from https://archive.mozilla.org/pub/firefox/candidates/)
Actual results:
Running this benchmark seems to be flaky in firefox js shell
Sometimes it completes within 400 ms - which shouldn't be possible as the benchmark itself has a measurement period of 2+ seconds.
% third_party/firefox_jsshell/js $PWD/pkg/dart2wasm/bin/run_wasm.js $PWD/out.O4.mjs $PWD/out.O4.wasm
third_party/firefox_jsshell/js $PWD/pkg/dart2wasm/bin/run_wasm.js 0.44s user 0.05s system 121% cpu 0.400 total
%
Sometimes the benchmark seems to run for the expected time but doesn't print anything:
% third_party/firefox_jsshell/js $PWD/pkg/dart2wasm/bin/run_wasm.js $PWD/out.O4.mjs $PWD/out.O4.wasm
third_party/firefox_jsshell/js $PWD/pkg/dart2wasm/bin/run_wasm.js 2.27s user 0.12s system 105% cpu 2.258 total
%
and sometimes it runs normall
% third_party/firefox_jsshell/js $PWD/pkg/dart2wasm/bin/run_wasm.js $PWD/out.O4.mjs $PWD/out.O4.wasm
JsonChunkedUtf8RoundTrip(RunTime): 4680.0 us.
third_party/firefox_jsshell/js $PWD/pkg/dart2wasm/bin/run_wasm.js 2.67s user 0.14s system 106% cpu 2.644 total
%
Expected results:
It should always run for 2+ seconds and print
JsonChunkedUtf8RoundTrip(RunTime): XXX us.
Updated•1 year ago
|
Component: Untriaged → JavaScript: WebAssembly
Product: Firefox → Core
| Assignee | ||
Comment 2•1 year ago
|
||
Updated•1 year ago
|
Severity: -- → S3
Priority: -- → P1
Updated•1 year ago
|
Assignee: nobody → rhunt
Attachment #9476368 -
Attachment description: WIP: Bug 1956768 - wasm: Do a CanGC string allocation for js-string/fromCharCodeArray → Bug 1956768 - wasm: Do a CanGC string allocation for js-string/fromCharCodeArray. r?yury
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/c737a193828e
wasm: Do a CanGC string allocation for js-string/fromCharCodeArray. r=yury
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox139:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
Updated•1 year ago
|
QA Whiteboard: [qa-triage-done-c140/b139]
| Assignee | ||
Updated•10 months ago
|
Regressions: CVE-2025-13016
You need to log in
before you can comment on or make changes to this bug.
Description
•