-
Notifications
You must be signed in to change notification settings - Fork 473
[spec] Parsing and validation in a single pass seems to be discouraged #1170
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
Comments
No, every negative test should contain only one mistake. But it's easy to miss cases where that's not the case. Happy to accept fixes. :) |
ProblemThe problematic test checks
but the parser will just consume the next byte being the end
and will fail because of the missing final The problem is that in the middle we have Solution
|
Right, though you would need to add blocks, not functions. I think it should work, as long as you made the |
This test doesn't really test what it says: the br_table is consumed correctly, and instead the `end` instruction is missing. This has caused various issues in decoders (see issue #1170) as well as requiring changing the error message in future proposals (e.g. bulk memory).
This test doesn't really test what it says: the br_table is consumed correctly, and instead the `end` instruction is missing. This has caused various issues in decoders (see issue #1170) as well as requiring changing the error message in future proposals (e.g. bulk memory).
This test doesn't really test what it says: the br_table is consumed correctly, and instead the `end` instruction is missing. This has caused various issues in decoders (see issue WebAssembly#1170) as well as requiring changing the error message in future proposals (e.g. bulk memory).
This test doesn't really test what it says: the br_table is consumed correctly, and instead the `end` instruction is missing. This has caused various issues in decoders (see issue WebAssembly#1170) as well as requiring changing the error message in future proposals (e.g. bulk memory).
Remove the code section in tests for malformed element section. Otherwise the code section id (0x0a) is taken as an element's table index what is a validation error. This is similar to the previously reported issue: WebAssembly#1170.
Remove the code section in tests for malformed element section. Otherwise the code section id (0x0a) is taken as an element's table index what is a validation error. This is similar to the previously reported issue: WebAssembly#1170.
Remove the code section in tests for malformed element section. Otherwise the code section id (0x0a) is taken as an element's table index what is a validation error. This is similar to the previously reported issue: #1170.
Remove the code section in tests for malformed element section. Otherwise the code section id (0x0a) is taken as an element's table index what is a validation error. This is similar to the previously reported issue: WebAssembly#1170.
* [spec] automate instruction index rebuild (#1259) * [test] Add test for malformed functype (#1254) * [test] Correct tests for missing elements (#1251) Remove the code section in tests for malformed element section. Otherwise the code section id (0x0a) is taken as an element's table index what is a validation error. This is similar to the previously reported issue: WebAssembly/spec#1170. * [test] Add tests for data segment with memidx 1 (#1249) * [test] Correct i32.store alignment in a LEB128 test (#1261) In the binary-leb128.wast, change the alignment of an i32.store instruction from 3 (invalid) to 2 (the intention suggested by the comment). Co-authored-by: Andreas Rossberg <[email protected]> Co-authored-by: Paweł Bylica <[email protected]>
This test case in
binary.wast
(https://github.com/WebAssembly/spec/blob/v1.1/test/core/binary.wast#L739-L759) tests forassert_malformed
, e.g. parser error. However it also contains a validation error.This turns out to pose a difficulty to engines, which would try to do parsing and (or a part of) validation in a single pass.
Is this intentional?
The text was updated successfully, but these errors were encountered: