Stream: git-wasmtime

Topic: wasmtime / issue #13838 Consider skipping GC heap decommi...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2026 at 12:12):

tschneidereit opened issue #13838:

With the pooling instance allocator, we use virtual memory tricks to reset memories to their original size and discard their contents. For linear memories, both are important even when reusing the same memory for a fresh instance of the same type: the fresh instance mustn't observe stale contents, nor must it see a larger linear memory heap than expected.

For GC using instances, neither of these applies in the same way, so we could consider avoiding some of this work:

What I'd propose is that we set the linear memory size for GC heaps to the configured maximum slot size right away (if we aren't already doing so; I didn't check that part) and skip decommitting for memories whose allocated size is < pooling-memory-keep-resident.

Note that AFAICT we're not applying instance type affinity to GC heap memories at all, so that'd have to change as well for this to be useful.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2026 at 12:12):

tschneidereit added the wasm-proposal:gc label to Issue #13838.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2026 at 12:12):

tschneidereit added the wasmtime:pooling-allocator label to Issue #13838.

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

alexcrichton added the performance label to Issue #13838.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2026 at 15:32):

fitzgen commented on issue #13838:

This should definitely be a config knob because, while not strictly necessary, it is a defense-in-depth mitigation for any kind of bug that would allow reading uninitialized GC heap bytes and preventing that bug from allowing a guest to exfiltrate data from a previous instance.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2026 at 15:38):

tschneidereit commented on issue #13838:

Oh yeah, I definitely agree with that!


Last updated: Jul 29 2026 at 05:03 UTC