-
Notifications
You must be signed in to change notification settings - Fork 245
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
wasmparser accepts some malformed modules #1671
Comments
cc @trzeciak would you be willing to take a look at this? |
Or, actually, I think this may be working as intended mostly:
I think the problem is that these tests are asserting for "unexpected token" which are specifically about the s-expression-form of these instructions in the text parser. So I think this may be related to the text-parser implementation of the legacy exceptions proposal rather than the validator? |
Yeah, I agree the problem is with the text parser -- these are supposed to be malformed (not just invalid). I think ideally the validator would not be getting run at all on the FWIW, it's possible this may not be specific to exceptions. This test also passes in the reference interpreter and WABT but not in current wasm-tools: (assert_malformed (module quote "(func end)") "unexpected token") |
Ah yeah the exact shape of an error and which stage of the wasm-tools tooling reports an error is often somewhat different than the spec tests. There's a large method for "matching" errors as a result of this. For example in your Much of this comes about from |
Sorry for the delay (PTO), if I understand correctly, this is nothing new related to the legacy-exceptions proposal. |
In the legacy-exceptions proposal, this module is malformed:
but wasmparser accepts it. This prevents passing some of the
assert_malformed
tests in the legacy-exceptions tests. (The resulting modules do fail validation.)The text was updated successfully, but these errors were encountered: