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
foo.wat:4:43: error: invalid elem expression expression; must be either ref.null or ref.func.
(elem 0 (offset (i32.const 0)) funcref (global.get 0)))
^^^^^^^^^^
If I use the --no-check flag I am able to override the check and generate a resulting .wasm file.
Looking at the generated file in a hexdump, it looks exactly like I would expect it to. However I am unable to get wasm2wat to accept this generated module, even if I use the --no-check flag.
Am I misreading the spec, or is this a bug in wabt?
Interesting, that does look like a bug in the support for the reference types proposal, but it also must represent a hole in the spec tests since wabt runs all the spec tests tests for reference types.
Activity
[-]Is `global.get` in element segment?[/-][+]Is `global.get` allowed in element segments?[/+]sbc100 commentedon Apr 16, 2023
Interesting, that does look like a bug in the support for the reference types proposal, but it also must represent a hole in the spec tests since wabt runs all the spec tests tests for reference types.
sbc100 commentedon Apr 17, 2023
I added a spec test to cover this case, but it will take a bit of work on the wabt side to fix it I think.
Share reading/validation code between elem exprs & other const exprs
Share reading/validation code between elem exprs & other const exprs
Share reading/validation code between elem exprs & other const exprs
Share reading/validation code between elem exprs & other const exprs
Share reading/validation code between elem exprs & other const exprs