Closed Bug 1716259 Opened 3 years ago Closed 3 years ago

WASM simd pref is not working correctly on Firefox on an Apple M1 device.

Categories

(Core :: JavaScript: WebAssembly, defect, P1)

Firefox 89
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kirpo476, Assigned: lth)

Details

Attachments

(1 file)

Attached image mandelbrot.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

  1. Pull the following repo: https://github.com/pretentious7/mandelbrot-ascript
  2. Run server.py
  3. Observe the following error in the console: CompileError: wasm validation error: at offset 191: expected global type
  4. 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.

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.

Component: Untriaged → Javascript: WebAssembly
Product: Firefox → Core

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: nobody → lhansen
Severity: -- → S3
Priority: -- → P1

(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.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME

I guess since this was filed against FF89 the appropriate response is "INVALID" (feature not supported) or "WONTFIX" (won't backport).

Resolution: WORKSFORME → WONTFIX

Thanks for the responses!
Really helpful!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: