Skip to content
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

Fix validation of switch. #99

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Fix validation of switch. #99

merged 2 commits into from
Nov 27, 2024

Conversation

dhil
Copy link
Member

@dhil dhil commented Nov 22, 2024

The validation of switch was not working as intended when the "switcher" and "switchee" had different continuation type immediates.

The fix is to replace the current continuation from the argument list with the switched-to continuation. The previous thing happened to be working when the "switcher" and "switchee" used the same continuation type immediate.

I also noticed a bug in the testsuite runner. It has not been running the stack switching tests since commit 70086b9. I have added the "stack-switching" subdirectory to the test script runner such that the tests are now being run again by make test.

Resolves #98.

The validation of `switch` was not working as intended when the
"switcher" and "switchee" had different continuation type immediates.

The fix is to replace the current continuation from the argument list
with the switched-to continuation. The previous thing happened to be
working when the "switcher" and "switchee" used the same continuation
type immediate.

I also noticed a bug in the testsuite runner. It was not running the stack switching tests since commit WebAssembly@70086b9. I have added the "stack-switching" subdirectory to the test script runner such that the tests are now being run again by `make test`.

Resolves WebAssembly#98.
@dhil dhil requested a review from rossberg November 22, 2024 20:21
interpreter/valid/valid.ml Outdated Show resolved Hide resolved
Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
@dhil
Copy link
Member Author

dhil commented Nov 27, 2024

I'll merge this fix to the switch validation bug and to reactivate the CI for the next patches.

@dhil dhil merged commit 3ac42d8 into WebAssembly:main Nov 27, 2024
1 check passed
@dhil dhil deleted the fix-switch-valid branch November 27, 2024 09:43
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.

[reference interpreter] validation bug on switch with non-recursive type
2 participants