Skip to content

Conversation

@keithw
Copy link
Member

@keithw keithw commented Apr 13, 2022

This PR updates the br_table validation and then modifies spectest-interp to require success on "module" and "register" commands. (The only other test with this problem was just fixed in #1894.)

(Disclaimer: I'm not 100% positive that this correctly captures the new br_table validation algorithm -- it seems somehow too simple. But it does seem to be what the appendix (https://webassembly.github.io/spec/core/appendix/algorithm.html#validation-of-opcode-sequences) is asking for, and it does pass all of the core spec tests.)

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the br_table validation rules I think we can but fairly sure its good if the spec tests all path.

lgtm % comment.

BTW, why not include modules in the tally.. then I would expect the see the overall number of tests go up in most files.. which would tell us just how much coverage we've been missing out on.

@keithw
Copy link
Member Author

keithw commented Apr 13, 2022

Done. If it's any solace, the corresponding wasm2c spec tests (for the same wast files) have been enforcing module validity all along, and that goes through basically the same codepath, so it hasn't exactly been missing out on this test coverage completely. (And of course the absence of an error message in the .txt file was also test coverage -- there were only two tests that had this issue, and now it's going to be zero.)

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow.. we have quite a lack coverage there it seems.

@sbc100 sbc100 merged commit 39022f8 into WebAssembly:main Apr 13, 2022
@keithw keithw deleted the spectest-interp-enforce-validity branch April 13, 2022 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants