Cranelift: fix ret value of instanceCall when the ret value is only internally used
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox73 | --- | fixed |
People
(Reporter: bbouvier, Assigned: bbouvier)
References
Details
Attachments
(3 files)
In wasm2clif instance_call, we shouldn't return the ret Value when it's only used for runtime error checking, otherwise this trips up assertions.
| Assignee | ||
Comment 1•5 years ago
|
||
The return value of a wasm builtin call may just be used to check if the
runtime caused an internal error (e.g. oom). There are assertions in code that
the return value of wasm builtins not supposed to return a wasm value actually
do this, so we shouldn't return values that are only internally used.
This could have been done a simpler way by only having "FailureMode::NotZero"
imply "do not return", but this is more future-proof like this: shared memory
/ atomics builtins both check the internal value and return it to the wasm
value stack.
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
With the first two patches (the last one is the end of a small refactoring we discussed earlier), all the wasm jit-tests now pass on x64 with Cranelift!
Comment 5•5 years ago
|
||
(In reply to Benjamin Bouvier [:bbouvier] from comment #4)
With the first two patches (the last one is the end of a small refactoring we discussed earlier), all the wasm jit-tests now pass on x64 with Cranelift!
Nice!
Comment 8•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b92d5b9b880a
https://hg.mozilla.org/mozilla-central/rev/fbeac1746d50
https://hg.mozilla.org/mozilla-central/rev/b0fb09545a01
Description
•