Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue decoding table elements #1878

Closed
codefromthecrypt opened this issue Apr 1, 2022 · 7 comments
Closed

Issue decoding table elements #1878

codefromthecrypt opened this issue Apr 1, 2022 · 7 comments

Comments

@codefromthecrypt
Copy link

1.24 has no problem, but current versions including latest mistake the table element ID for re-defining the element:

~/Downloads/wabt-1.0.28/bin/wast2json --debug-names ./tests/spectest/testdata/elem.wast
./tests/spectest/testdata/elem.wast:16:4: error: redefinition of elem "$t"
  (elem $t (i32.const 0) $f $f)
   ^^^^
./tests/spectest/testdata/elem.wast:17:4: error: redefinition of elem "$t"
  (elem $t (offset (i32.const 0)))
   ^^^^
./tests/spectest/testdata/elem.wast:18:4: error: redefinition of elem "$t"
  (elem $t (offset (i32.const 0)) $f $f)
   ^^^^
@keithw
Copy link
Member

keithw commented Apr 1, 2022

The bulk memory operations proposal changed the text format and is now enabled by default in wabt (the spec tests were revised at the same time -- it looks like you are trying to parse the elem.wast test from before that proposal was merged).

You can still parse the 1.0 syntax by passing the --disable-bulk-memory option to wast2json.

@codefromthecrypt
Copy link
Author

thanks for the tip. yeah we are still working on w3c recommendations not things that came after it. I'll wind back that setting.

@codefromthecrypt
Copy link
Author

sorry other things are failing. Is there a way to know which features are enabled by default?

@codefromthecrypt
Copy link
Author

meanwhile I added flags to disable everything except mutable globals which are there in 1.0

@sbc100
Copy link
Member

sbc100 commented Apr 13, 2022

sorry other things are failing. Is there a way to know which features are enabled by default?

There is a table to features in the README which lists which ones are enabled by default: https://github.com/WebAssembly/wabt#supported-proposals

@codefromthecrypt
Copy link
Author

thanks. maybe one suggestion would be to change the help output to include this info. I suppose I could have been more precise that I was wondering if the CLI can answer this. Meanwhile I'll put a comment where we use things to look at this table and keep track (for the areas where we need things to stay 1.0 compatible)

@codefromthecrypt
Copy link
Author

I realize I never formally asked for the feature to constrain to 1.0 (I did ask for a chart on the website, but that's a different matter).

--enable-1.0 can substitute for CLI output that says what's enabled and is a better solution (at least for me) #1899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants