-
Notifications
You must be signed in to change notification settings - Fork 708
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
wat2wasm: data section memory index #2518
Comments
Hmm, I can't speak to the web demo, but this seems to work fine in the actual main branch of the codebase. Are you able to bisect and identify when this was fixed in the code? We might just need to update the demo. |
It seems have been fixed for at least 2 years - I could not compile past 1.0.32. I guess demo only needs to update the |
I assume you enabled the multi-memory feature (which is still off by default)? |
Without that feature wabt throws error on validation stage. |
Take the following code:
Compile.
The data section has bytes:
As you can see from spec,
flag == 2
expects memory index u32, but wabt omits it.If you try to compile that code in JS, you'll see the error:
Adding memory index after segment flag solves the issue (watr has that fixed).
The text was updated successfully, but these errors were encountered: