Stream: git-wasmtime

Topic: wasmtime / PR #15247 Fix another Pulley prologue detectio...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2026 at 19:19):

alexcrichton opened PR #15247 from alexcrichton:fix-pulley-stack to bytecodealliance:main:

In addition to detecting PushFrame and PushFrameSave, the StackAlloc32 instruction can be used to allocate frames in Pulley in some situations related to the tail call ABI. Detect that here to properly handle the backtrace in these situations in the same manner as before for other functions.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2026 at 19:19):

alexcrichton removed the review request for wasmtime-core-reviewers from PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2026 at 19:19):

alexcrichton requested dicej for a review on PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2026 at 19:19):

alexcrichton requested wasmtime-core-reviewers for a review on PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2026 at 21:44):

github-actions[bot] added the label wasmtime:api on PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 22:03):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 22:03):

:speech_balloon: cfallin created PR review comment:

Incomplete sentence or missing word? "that grow the An overflow"

view this post on Zulip Wasmtime GitHub notifications bot (Nov 16 2026 at 22:03):

:speech_balloon: cfallin created PR review comment:

This feels pretty brittle to me: usually a good rule of thumb is not to try to interpret or match on shapes in the compiler's output, because it goes beyond the guarantee that the compiler usually makes (only that it will generate some code that has equivalent semantics to the input).

I wonder, could we either split the opcode into two for the two cases, or add some metadata somewhere (morally some kind of "unwind info") to help decode the state of the stack frames relative to the machine state?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:57):

alexcrichton requested cfallin for a review on PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:57):

alexcrichton removed the review request for wasmtime-compiler-reviewers from PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:57):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:57):

alexcrichton removed the review request for wasmtime-default-reviewers from PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:57):

alexcrichton updated PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:57):

alexcrichton requested fitzgen for a review on PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:57):

alexcrichton requested wasmtime-default-reviewers for a review on PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:59):

:memo: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 15:59):

:speech_balloon: alexcrichton created PR review comment:

I've adjusted to have a new opcode instead which creates an invariant that the first stack-allocating-opcode either fails or succeeds and pushes fp/lr, and that way the previous check of 2 opcodes is now a check for 3 possible opcodes. In some sense that doesn't really satisfy the property you're describing, we're still pattern-matching on the output of Cranelift. At the same time though this is such a niche case (accuracy of a stack overflow backtrace on Pulley) that I don't think this is worth all the rigamarole of side tables and things like that. I've tried to document the invariant in abi.rs for the Cranelift backend, does that seem reasonable?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 16:35):

:thumbs_up: cfallin submitted PR review:

Thanks! This seems fine for now. I guess in essence we can think of the constrained first-instruction choice as a new ISA requirement (any function that runs on the Pulley interpreter must start with ...) and since our ABI impl for the backend always emits a prologue that satisfies this, we can rely on it. Definitely feels better than prior (which, I guess technically, could also have been reified as an ISA requirement but was much more subtle).

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 16:35):

cfallin added PR #15247 Fix another Pulley prologue detection case to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 16:58):

:check: cfallin merged PR #15247.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 16:58):

cfallin removed PR #15247 Fix another Pulley prologue detection case from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC