-
Notifications
You must be signed in to change notification settings - Fork 454
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
assert_invalid and assert_malformed produce inconsistent JS tests #1647
Comments
Yes, malformed tests are not convertible. Generating the string Tests with assert_invalid should always be convertible. Can you point to an example where one uses a malformed quote? If so, that's a mistake. |
I didn't spot any non-convertible modules with Given that there are (currently) 1791 instances of |
The conversions of assertions and of modules are performed independently, so there is no checking or special casing for specific combinations. Could be added, but there isn't much value to it. Combining |
Ack, let's ignore the How much work would it be to skip the |
You certainly don't want to skip all assert_malformed tests, only those with textual modules. Special-casing that should not be difficult, only slightly ugly, I believe. Why do you care much about these cases? Aren't they cheap, since they fail immediately at decoding the first byte? |
The original motivation for filing this was that I was confused that we didn't fail the test quoted above (V8 was missing a validation and produced a trap at runtime instead of a validation error). Before fixing this I was checking if there is a test for this and I found the Hence the request to just skip those tests (maybe with a comment in the JS file) instead of including them but with the "" payload. As that's hex-encoded, it looks like valid test, but does not test anything reasonable. Definitely not high priority, but might avoid more confusion in the future. |
I observed this on the address.wast test, line 213:
Converted to JS via the spec interpreter (
./wasm -d address.wast -o address.js
), it produces this check:This checks that the string
<malformed quote>
is considered invalid Wasm, which is not a sensible test.I am not sure what we should do instead, I guess the underlying problem is that the interpreter cannot convert the WAT to binary, so there is not much it can do. Maybe it should skip the test instead?
The same happens with
assert_invalid
and any invalid string, e.g.The text was updated successfully, but these errors were encountered: