saulecabrera requested abrown for a review on PR #10781.
saulecabrera opened PR #10781 from saulecabrera:winch-issue-10751 to bytecodealliance:main:
This commit is a follow-up to
https://github.com/bytecodealliance/wasmtime/pull/10730 and closes https://github.com/bytecodealliance/wasmtime/issues/10751.In https://github.com/bytecodealliance/wasmtime/issues/10751, I forgot to update the branch emission heuristic checks.
Typically, branch-emitting code, such as br, will handle the results in the maybe_pop_results callback. In this case, we can safely assert that the stack pointer should be greater than or equal to the target base stack pointer offset before calling the callback. However, for certain cases, like
br_table, result handling must occur before invokingCodeContext::br, which can lead to assertion failures.To maintain the invariant check while accommodating both scenarios, this commit moves the assertion to occur after the callback is invoked.
<!--
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
-->
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #10781.
saulecabrera updated PR #10781.
saulecabrera requested pchickey for a review on PR #10781.
saulecabrera requested wasmtime-core-reviewers for a review on PR #10781.
saulecabrera updated PR #10781.
github-actions[bot] commented on PR #10781:
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>
alexcrichton submitted PR review.
alexcrichton merged PR #10781.
Last updated: Dec 06 2025 at 06:05 UTC