Kotlin example crashes with Wasm GC
Categories
(Core :: JavaScript: WebAssembly, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox112 | --- | fixed |
People
(Reporter: bashorov, Assigned: rhunt)
References
Details
Attachments
(3 files)
Steps to reproduce:
- Unzip an attached zip
- Start a server to serve files from the dir, like
python -m http.server - Open in the Firefox Nightly 112.0a1 (2023-02-20) (64-bit)
Actual results:
Got "Gah. Your tab just crashed."
Expected results:
It works and shows something like http://webreflection.github.io/dbmonster/
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
JFTR: it may related to https://bugzilla.mozilla.org/show_bug.cgi?id=1812132
| Assignee | ||
Comment 3•3 years ago
|
||
There is at least one issue here where we're performing a cast on a non-WasmGcObject which is causing a crash. I have a fix for that, but it uncovered another issue I'm looking into.
| Assignee | ||
Comment 4•3 years ago
|
||
The casting instructions currently assume that the input anyref is
just a WasmGcObject (either struct or array). However any JS Value
can become an anyref through extern.internalize. These values do
not have a typedef field and must checked for while casting.
This adds extra bloat to our casting instructions that we should
find a way to remove. Two options:
- Move the typedef from the object to the shape. This would
add an extra indirection to casting though. - Box non-WasmGcObject's in a WasmStructObject when extern.
internalize is called.
| Assignee | ||
Comment 5•3 years ago
|
||
Values that are used for a branch in baseline cannot be allocated
in the integer result registers as those will be used for transmitting
results to the next block.
There are two tweaks in br_on_cast needed:
- Stop pushing the object to the value stack but still using it in the
branch code, as that violates the baseline invariants which assume that
any register on the value stack can be sync'ed and then used for a
different purpose. - Ensure we don't allocate any registers to the result registers while
we're setting up the branch.
Depends on D170708
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Comment 7•3 years ago
|
||
Backed out for causing spider-monkey failures in js/src/jit-test/tests/wasm/gc/cast-extern.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/5eb81f0156a80fd113309e1a4671c134d0bc4615
Comment 8•3 years ago
|
||
It might be that the backout was caused by bug 1819351 [the command-line-parsing bug]
not having landed before this one? Just guessing.
| Assignee | ||
Comment 9•3 years ago
|
||
Ah, the test uses a SIMD type and that's not supported on ARM32.
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6e74a9817cbf
https://hg.mozilla.org/mozilla-central/rev/d3d9e99c352a
Updated•3 years ago
|
| Assignee | ||
Updated•2 years ago
|
Description
•