-
Notifications
You must be signed in to change notification settings - Fork 765
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
Invalid emitted binary for unreachable code #1113
Comments
Ah, I see the problem.
Fixing that produces the following error:
This error is correct; unreachable makes the stack polymorphic, so We can generate the invalid wasm file with
|
I see, thanks. Ok, then we are indeed emitting bad code in cases of unreachable code like this. |
Will be fixed by #1117. |
Testing the new fuzzer's emitted binaries in wasm VMs, I see something odd. This module
won't load in sm or v8,
It does work in wabt,
(I manually changed the version to 0xd since that's what wabt required), and it works in binaryen. Who is wrong here?
It seems like it should be valid, the unreachable sets us into the mode where it's ok to pop anything, so the i32.trunc is ok and the block popping an f32 should be ok? Is this a case of undefined behavior in wasm type checking?
The text was updated successfully, but these errors were encountered: