WASM simd pref is not working correctly on Firefox on an Apple M1 device.
Categories
(Core :: JavaScript: WebAssembly, defect, P1)
Tracking
()
People
(Reporter: kirpo476, Assigned: lth)
Details
Attachments
(1 file)
354.84 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
- Pull the following repo: https://github.com/pretentious7/mandelbrot-ascript
- Run server.py
- Observe the following error in the console: CompileError: wasm validation error: at offset 191: expected global type
- This is occuring in this file: https://github.com/pretentious7/mandelbrot-ascript/blob/main/build/mandel_final.wat
Actual results:
Ran the code from this (https://github.com/pretentious7/mandelbrot-ascript) repo on Firefox on an Apple M1 computer and got the following error: CompileError: Wasm validation error: at offset 191: expected global type.
The code runs without problem on Chrome, and on Firefox on other devices.
Expected results:
The expected result is a 100010001000 render of a part of the Mandelbrot set. An image is attached below.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Javascript: WebAssembly' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 2•3 years ago
•
|
||
Wasm SIMD is disabled on ARM64 devices in Firefox 89, SIMD for ARM64 ships in Firefox 90. Setting javascript.options.wasm_simd to true in about:config should make the site work. I'll double check.
Assignee | ||
Comment 3•3 years ago
|
||
(What I meant to say was, Wasm SIMD is unavailable on ARM64 devices in Firefox 89, and can't even be enabled by a pref.)
Works as expected in FF91 (current Nightly) on the M1, which has Wasm SIMD; should work in FF90 (current beta) too but I haven't tested this. When I disable the SIMD pref in about:config in FF91 I get the error that's reported in comment 0.
Since SIMD is not going to be available on all devices (neither Chrome nor Firefox has SIMD on Intel platforms below architecture level SSE4.1, and Firefox does not have SIMD on 32-bit ARM) best practice is probably to attempt to validate whether SIMD is present in the browser before using it.
Assignee | ||
Comment 4•3 years ago
|
||
I guess since this was filed against FF89 the appropriate response is "INVALID" (feature not supported) or "WONTFIX" (won't backport).
Description
•