alexcrichton opened PR #14757 from alexcrichton:fix-pulley-small-stack to bytecodealliance:main:
This commit fixes a possible panic that can happen when Pulley generates a trap where the stack is almost full or very small. The specific issue here is that the entry trampoline for Pulley can fail, unlike native platforms, because it's interpreted and has stack checks, unlike native platforms. If this entry trampoline fails then the backtracing implementation panics on an inconsistent state because an activation is expected but was never fully set up.
The fix in this commit is to handle this case when Pulley traps and skip getting a backtrace of the top-most activation. This is done with some light refactoring to plumb some
Option-ality around.<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested dicej for a review on PR #14757.
alexcrichton requested wasmtime-core-reviewers for a review on PR #14757.
alexcrichton requested fitzgen for a review on PR #14757.
alexcrichton requested wasmtime-default-reviewers for a review on PR #14757.
github-actions[bot] added the label pulley on PR #14757.
github-actions[bot] added the label wasmtime:api on PR #14757.
github-actions[bot] commented on PR #14757:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "pulley", "wasmtime:api"Thus the following users have been cc'd because of the following labels:
- fitzgen: pulley
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
:thumbs_up: fitzgen submitted PR review.
fitzgen added PR #14757 Fix a possible panic with small stacks and Pulley to the merge queue.
:check: fitzgen merged PR #14757.
fitzgen removed PR #14757 Fix a possible panic with small stacks and Pulley from the merge queue.
Last updated: Oct 31 2026 at 23:03 UTC