macovedj opened PR #14379 from macovedj:winch-unreachable-try-table to bytecodealliance:main:
Compiling a
try_tableafter an unconditional return currently fails withInvalid local offset, and with fuel enabled fails withInvalid fuel state. The first issue arises from Winch still registering its catches and attempting to emit landing pads, even though entering an unreachable block skips recording the stack state those handlers need. The latter comes from not skipping fuel accounting for unreachable control operators.Winch now uses a plain block frame for a
try_tableentered in unreachable code, preserving nesting without registering catches. It also skips fuel accounting for unreachable operators while retaining the assertion that preceding reachable code flushed its pending charges.Fixes #14377
macovedj requested fitzgen for a review on PR #14379.
macovedj requested wasmtime-compiler-reviewers for a review on PR #14379.
macovedj requested wasmtime-core-reviewers for a review on PR #14379.
github-actions[bot] added the label winch on PR #14379.
github-actions[bot] commented on PR #14379:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
:memo: saulecabrera submitted PR review:
The fix looks good to me; it seems that we have a stale fuzzing config that we need to update here so that the fuzzers can actually exercise exceptions? https://github.com/bytecodealliance/wasmtime/blob/main/crates/fuzzing/src/generators/config.rs#L696
macovedj requested wasmtime-fuzz-reviewers for a review on PR #14379.
macovedj updated PR #14379.
macovedj commented on PR #14379:
The fix looks good to me; it seems that we have a stale fuzzing config that we need to update here so that the fuzzers can actually exercise exceptions? https://github.com/bytecodealliance/wasmtime/blob/main/crates/fuzzing/src/generators/config.rs#L696
Good catch! Updated. Also found another spot in
oracles.rswhere Cranelift was being forced over Winch for exceptions.
github-actions[bot] added the label fuzzing on PR #14379.
github-actions[bot] commented on PR #14379:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "fuzzing"Thus the following users have been cc'd because of the following labels:
- fitzgen: fuzzing
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
:thumbs_up: saulecabrera submitted PR review.
saulecabrera added PR #14379 winch: handle unreachable try_table and fuel accounting to the merge queue.
:check: saulecabrera merged PR #14379.
saulecabrera removed PR #14379 winch: handle unreachable try_table and fuel accounting from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC