Stream: git-wasmtime

Topic: wasmtime / PR #12933 Add GC zeal assertions


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

fitzgen opened PR #12933 from fitzgen:add-gc-zeal-integrity-checks to bytecodealliance:main:

<!--
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 21:17):

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

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

fitzgen requested alexcrichton for a review on PR #12933.

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

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

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

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

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

github-actions[bot] added the label wasmtime:ref-types on PR #12933.

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

github-actions[bot] commented on PR #12933:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:ref-types"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

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

alexcrichton submitted PR review.

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

alexcrichton created PR review comment:

Also, I'd recommend unconditional calls below and a conditional early-return in the function itself here.

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

alexcrichton created PR review comment:

if cfg!(gc_zeal) instead of #[cfg]

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

alexcrichton created PR review comment:

I'm a bit confused by how this works. If the counter is positive, alloc_raw is runn, wouldn't this execute here too? I figured that the None case up above would reset gc_zeal_alloc_counter and otherwise this block wouldn't be needed here.

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

alexcrichton created PR review comment:

And one final thought: with a #[cfg] this means that it's not factored into the caching logic for example and isn't visible in Tunables (e.g. compile with-zeal and then load into without-zeal or vice-versa). Not a huge concern necessarily but figured I'd write down anyway

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

alexcrichton created PR review comment:

This is probably me just not being used to "zeal", but to me the naming here is pretty disconnected from the purpose. IIUC this env var is "return OOM everything nth allocation" which to me would be better named something like WASMTIME_GC_ZEAL_OOM_AFTER or something like that. Maybe I just don't like the name "zeal" since I have no idea what it's connected to...

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:19):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:19):

fitzgen created PR review comment:

Yeah, I'd like to also add it to tunables eventually, so we can use it during fuzzing. Will cross that bridge when we get to it though.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:26):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:26):

fitzgen created PR review comment:

Yeah, I futzed around with this and made it more complicated than needed. Will simplify.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:27):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:27):

fitzgen created PR review comment:

The OOM is just a mechanism, what its real purpose is to force GC after every N allocations.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:28):

fitzgen updated PR #12933.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:28):

fitzgen has enabled auto merge for PR #12933.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 19:41):

fitzgen added PR #12933 Add GC zeal assertions to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 20:04):

fitzgen merged PR #12933.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 02 2026 at 20:04):

fitzgen removed PR #12933 Add GC zeal assertions from the merge queue.


Last updated: Apr 13 2026 at 00:25 UTC