cfallin opened PR #12815 from cfallin:issue-12808 to bytecodealliance:main:
We have an invariant that the
stack_shapeandstackstacks are the same length whenever we emit debug tags. The invariant is temporarily broken when any result is pushed (the value stack becomes longer) but then restored between each instruction.Now that traps take debug tags too, we have to be careful to maintain the invariant. Usually no new results are pushed before checking for trap-conditions. However
align_atomic_addrpopped then re-pushed a value on the value stack before a trap check; this could cause the invariant to be violated and hence lead to a panic.This PR instead uses the
peek1helper to maintain the shape stack entry.Fixes #12808.
<!--
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 wasmtime-compiler-reviewers for a review on PR #12815.
cfallin requested pchickey for a review on PR #12815.
cfallin requested wasmtime-core-reviewers for a review on PR #12815.
alexcrichton submitted PR review.
alexcrichton added PR #12815 Debugging: fix panic in align_atomic_addr when guest-debug is enabled. to the merge queue
alexcrichton removed PR #12815 Debugging: fix panic in align_atomic_addr when guest-debug is enabled. from the merge queue
alexcrichton merged PR #12815.
Last updated: Mar 23 2026 at 16:19 UTC