cfallin opened PR #11507 from cfallin:unreachable-try-table to bytecodealliance:main:
Our Wasm-to-CLIF translator has a separate match-over-opcodes for unreachable code that mostly does nothing, but needs to push entries onto the control stack so that
end-opcode processing works properly and tracks the bytecode's nesting (which is important because after anendwe might re-enter reachable code).Previously,
try_tablewas not handled here -- it fell into the catchall case that did nothing -- so atry_tablein unreachable code (most trivially,(unreachable) (try_table)in any block) would result in a panic. This PR fixes that by updatingtry_tablehandling to work likeblockandloopin unreachable contexts.Fixes #11505.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested fitzgen for a review on PR #11507.
cfallin requested wasmtime-compiler-reviewers for a review on PR #11507.
cfallin requested wasmtime-core-reviewers for a review on PR #11507.
alexcrichton submitted PR review.
alexcrichton merged PR #11507.
Last updated: Dec 06 2025 at 07:03 UTC