Stream: git-wasmtime

Topic: wasmtime / PR #13634 Fix leaking GC heap slots on errors


view this post on Zulip Wasmtime GitHub notifications bot (Jun 13 2026 at 18:49):

alexcrichton opened PR #13634 from alexcrichton:fix-gc-slot-leak to bytecodealliance:main:

This commit fixes a bugs Store::allocate_gc_store where a linear memory slot could be allocate but a failure allocating a GC heap slot would cause the linear memory to get leaked (not properly deallocated within the pooling allocator). The fix here is to juggle ownership slightly differently, notably deferring the attach operation to only after the GC heap is successfully allocated. This enables gracefully handling the error of allocating a GC heap and deallocating the memory.

<!--
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 (Jun 13 2026 at 18:49):

alexcrichton requested pchickey for a review on PR #13634.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 13 2026 at 18:49):

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

view this post on Zulip Wasmtime GitHub notifications bot (Jun 13 2026 at 20:08):

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

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

:thumbs_up: pchickey submitted PR review.

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

alexcrichton added PR #13634 Fix leaking GC heap slots on errors to the merge queue.

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

:check: alexcrichton merged PR #13634.

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

alexcrichton removed PR #13634 Fix leaking GC heap slots on errors from the merge queue.


Last updated: Jul 29 2026 at 05:03 UTC