You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wasm_of_ocaml generates wasm that's only valid in Chrome but fails in Firefox with "unrecognized opcode: 12 0"
Here is the source code: fiat-html.tar.gz
If you unpack the tar.gz, run python -m http.server 8000 in the fiat-html directory, and then navigate to http://localhost:8000/?argv=%5B%22-h%22%5D&interactive&wasm, you'll get a page that works fine in chrome but fails in firefox (open the console) with "Uncaught (in promise) CompileError: wasm validation error: at offset 9925682: unrecognized opcode: 15 0" or similar (not sure why I get different validation errors sometimes).
The .tar.gz contains the standalone wasm_fiat_crypto.ml used to generate the wasm with -package unix -w -20 -g -package js_of_ocaml -linkpkg and then wasm_of_ocaml --source-map --no-inline.
Expected behavior
The generated code should work in both Chrome and Firefox
Tail-calls have not been enabled by default in the stable version of Firefox 120, unfortunately.
You can set javascript.options.wasm_tail_calls to true in about:config to enable them. Or you can try with Firefox Beta.
Describe the bug
wasm_of_ocaml
generates wasm that's only valid in Chrome but fails in Firefox with "unrecognized opcode: 12 0"Here is the source code: fiat-html.tar.gz
If you unpack the tar.gz, run
python -m http.server 8000
in thefiat-html
directory, and then navigate to http://localhost:8000/?argv=%5B%22-h%22%5D&interactive&wasm, you'll get a page that works fine in chrome but fails in firefox (open the console) with "Uncaught (in promise) CompileError: wasm validation error: at offset 9925682: unrecognized opcode: 15 0" or similar (not sure why I get different validation errors sometimes).The .tar.gz contains the standalone wasm_fiat_crypto.ml used to generate the wasm with
-package unix -w -20 -g -package js_of_ocaml -linkpkg
and thenwasm_of_ocaml --source-map --no-inline
.Expected behavior
The generated code should work in both Chrome and Firefox
Versions
Firefox: 120.0 (64-bit)
ocaml-option-fp.1,ocaml-variants.4.14.1+options
The text was updated successfully, but these errors were encountered: