Skip to content

[spec] Fix oversight in reversal of br_table validation #1305

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

Merged
merged 1 commit into from
Apr 14, 2021
Merged

Conversation

rossberg
Copy link
Member

@rossberg rossberg commented Apr 7, 2021

WebAssembly/reference-types#116 re-reversed the validation of br_table, but only did so in tests, interpreter, and the spec's algorithm appendix. It somehow missed the actual validation rule in the spec. This fixes that oversight.

@rossberg rossberg requested a review from gahaas April 7, 2021 06:40
@rossberg
Copy link
Member Author

@gahaas, ping.

Copy link
Collaborator

@gahaas gahaas left a comment

Choose a reason for hiding this comment

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

LGTM

@rossberg rossberg merged commit 8b73d00 into master Apr 14, 2021
@rossberg rossberg deleted the brtable branch April 14, 2021 08:29
pull bot pushed a commit to Alan-love/v8 that referenced this pull request Apr 15, 2021
The typing of br_table was relaxed in
WebAssembly/spec#1305. Before, we had to compute
the greatest lower bound of all branch types and make sure that stack
values are subtypes of that type. Now, we have to check that the stack
values are subtypes of each individual branch. This makes a difference
only in polymorphic stacks, but greatly simplifies the code, especially
with the upcoming introduction of a much more complex type system in
wasm-gc.

Change-Id: I6e3b410cfe0e71a97623b3030b3575ef707c4900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2827897
Commit-Queue: Manos Koukoutos <[email protected]>
Reviewed-by: Clemens Backes <[email protected]>
Cr-Commit-Position: refs/heads/master@{#73982}
Hhro pushed a commit to prosyslab/v8 that referenced this pull request Jul 19, 2022
The typing of br_table was relaxed in
WebAssembly/spec#1305. Before, we had to compute
the greatest lower bound of all branch types and make sure that stack
values are subtypes of that type. Now, we have to check that the stack
values are subtypes of each individual branch. This makes a difference
only in polymorphic stacks, but greatly simplifies the code, especially
with the upcoming introduction of a much more complex type system in
wasm-gc.

Change-Id: I6e3b410cfe0e71a97623b3030b3575ef707c4900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2827897
Commit-Queue: Manos Koukoutos <[email protected]>
Reviewed-by: Clemens Backes <[email protected]>
Cr-Commit-Position: refs/heads/master@{#73982}
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