Stream: git-wasmtime

Topic: wasmtime / PR #15316 Ensure that collector-agnostic GC he...


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

fitzgen opened PR #15316 from fitzgen:main-backport-48d37339a3 to bytecodealliance:main:

…_heap = true`

We previously set needs_gc_heap = true when creating a GcCompiler, but unfortunately this was not a complete bottleneck for GC heap access because collector-agnostic accesses (e.g. ref.tests that only read the GC header word) do not construct a GcCompiler before emitting code to access the GC heap. This meant that needs_gc_heap was not set, and therefore we didn't pre-allocate a GC heap upon the module's instantiation, which meant that compiled Wasm code could read the initial dangling GC heap base pointer, read the null page, and trigger a process abort.

This commit fixes the bug by setting needs_gc_heap = true when creating the GC heap's Heap and when emitting code to access its base and bound. It additionally adds a few tactical assertions that we have marked needs_gc_heap = true, such as when getting the GC memflags.

<!--
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 16 2026 at 21:36):

fitzgen requested cfallin for a review on PR #15316.

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

fitzgen removed the review request for wasmtime-compiler-reviewers from PR #15316.

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

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

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

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

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

:thumbs_up: alexcrichton submitted PR review.

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

:speech_balloon: alexcrichton created PR review comment:

Could this move to a *.wast test?

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

fitzgen updated PR #15316.

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

fitzgen has enabled auto merge for PR #15316.

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

fitzgen updated PR #15316.

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

fitzgen added PR #15316 Ensure that collector-agnostic GC heap access emission sets `needs_gc… to the merge queue.

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

github-merge-queue[bot] removed PR #15316 Ensure that collector-agnostic GC heap access emission sets `needs_gc… from the merge queue.

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

alexcrichton added PR #15316 Ensure that collector-agnostic GC heap access emission sets `needs_gc… to the merge queue.

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

:check: alexcrichton merged PR #15316.

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

alexcrichton removed PR #15316 Ensure that collector-agnostic GC heap access emission sets `needs_gc… from the merge queue.


Last updated: Nov 19 2026 at 20:05 UTC