Skip to content

Fix some unreachable!() with wasm components #10473

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

Conversation

alexcrichton
Copy link
Member

This commit resolves a few panics in Wasmtime's compilation of components with respect to tags and the exception-handling wasm proposal. Despite exception-handling not being enabled in Wasmtime at this time these panics were still reachable due to an issue in wasm-tools's validation not being exhaustive enough for this proposal feature combination: bytecodealliance/wasm-tools#2114.

This is not full support for exceptions since it can't be tested yet, but this should be enough to ensure that the validator will get far enough to flag components as otherwise invalid due to using tags that can't be present (as core wasm tags can't be present in core modules right now, the EXCEPTIONS feature is always disabled).

This commit resolves a few panics in Wasmtime's compilation of
components with respect to tags and the exception-handling wasm
proposal. Despite exception-handling not being enabled in Wasmtime at
this time these panics were still reachable due to an issue in
wasm-tools's validation not being exhaustive enough for this proposal
feature combination: bytecodealliance/wasm-tools#2114.

This is not full support for exceptions since it can't be tested yet,
but this should be enough to ensure that the validator will get far
enough to flag components as otherwise invalid due to using tags that
can't be present (as core wasm tags can't be present in core modules
right now, the `EXCEPTIONS` feature is always disabled).
@alexcrichton alexcrichton requested a review from a team as a code owner March 26, 2025 21:26
@alexcrichton alexcrichton requested review from dicej and removed request for a team March 26, 2025 21:26
@alexcrichton
Copy link
Member Author

Thanks to @0xalpharush for discovering this issue and letting us know!

@alexcrichton alexcrichton enabled auto-merge March 26, 2025 21:29
@alexcrichton alexcrichton added this pull request to the merge queue Mar 26, 2025
Merged via the queue into bytecodealliance:main with commit 865d1bb Mar 26, 2025
41 checks passed
@alexcrichton alexcrichton deleted the fix-panic-with-tags branch March 26, 2025 22:02
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