Stream: git-wasmtime

Topic: wasmtime / PR #12934 Preserve `try_call[_indirect]` stack...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 22:35):

fitzgen opened PR #12934 from fitzgen:fix-stack-maps-for-try-call-lowering to bytecodealliance:main:

Branch instructions are skipped in the main lowering loop, which means the stack map forwarding code is never reached for them. The branch lowering path didn't forward stack maps either. This was fine because branch instructions couldn't previously ever be safepoints. However, with the introduction of try_call and try_call_indirect, we now have instructions that are both safepoints and branches.

This caused GC references live across try_call[_indirect] instructions to not be traced during garbage collection, leading to use-after-free within the GC heap sandbox when the collector swept those untraced-but-still-live objects.

The fix adds stack map forwarding after branch lowering, mirroring the existing logic for non-branch instructions.

Fixes bytecodealliance/wasmtime#11753.

<!--
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 (Apr 01 2026 at 22:35):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #12934.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 22:35):

fitzgen requested cfallin for a review on PR #12934.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 22:35):

fitzgen requested wasmtime-core-reviewers for a review on PR #12934.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 22:45):

fitzgen updated PR #12934.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 23:08):

cfallin submitted PR review:

LGTM -- good find; thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 23:08):

cfallin added PR #12934 Preserve try_call[_indirect] stack maps during lowering to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 23:54):

cfallin merged PR #12934.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 01 2026 at 23:54):

cfallin removed PR #12934 Preserve try_call[_indirect] stack maps during lowering from the merge queue.


Last updated: Apr 12 2026 at 23:10 UTC