Stream: git-wasmtime

Topic: wasmtime / PR #12815 Debugging: fix panic in align_atomic...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2026 at 00:25):

cfallin opened PR #12815 from cfallin:issue-12808 to bytecodealliance:main:

We have an invariant that the stack_shape and stack stacks 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_addr popped 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 peek1 helper to maintain the shape stack entry.

Fixes #12808.

<!--
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 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 (Mar 21 2026 at 00:26):

cfallin requested wasmtime-compiler-reviewers for a review on PR #12815.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2026 at 00:26):

cfallin requested pchickey for a review on PR #12815.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2026 at 00:26):

cfallin requested wasmtime-core-reviewers for a review on PR #12815.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2026 at 14:55):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2026 at 14:55):

alexcrichton added PR #12815 Debugging: fix panic in align_atomic_addr when guest-debug is enabled. to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2026 at 15:19):

alexcrichton removed PR #12815 Debugging: fix panic in align_atomic_addr when guest-debug is enabled. from the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2026 at 15:19):

alexcrichton merged PR #12815.


Last updated: Mar 23 2026 at 16:19 UTC