Stream: git-wasmtime

Topic: wasmtime / PR #12921 Add "GC Zeal" infrastructure for add...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2026 at 23:51):

fitzgen requested alexcrichton for a review on PR #12921.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2026 at 23:51):

fitzgen opened PR #12921 from fitzgen:add-gc-zeal-infra to bytecodealliance:main:

This initial commit just sets up the initial GC Zeal infrastructure, it doesn't actually start using it anywhere yet.

<!--
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 (Mar 31 2026 at 23:51):

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2026 at 23:51):

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

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2026 at 23:51):

fitzgen requested wasmtime-default-reviewers for a review on PR #12921.

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

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

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

alexcrichton submitted PR review:

I'm not personally too familiar with the "GC Zeal" mode from SpiderMonkey (where I think you're drawing inspiration from right?). Could you detail a bit more how this is going to be used and what it would mean? Is this worth perhaps documenting somewhere?

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

alexcrichton created PR review comment:

Would using something with a more "random" bit pattern make sense here perhaps? I'd imagine that'd be much less likely to happen naturally as opposed to paving over with -1 accidentally aligning with this poison value. I don't mean true random but basically go run random::<u8>() and then hardcode that here.

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

alexcrichton created PR review comment:

I'm not familiar with "gc zeal" in the spidermonkey sense so I don't have a great intuition here, but what's the benefit of this over debug_assert!?

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

alexcrichton created PR review comment:

This'll probably want an if: ... to only run on the full test suite run to avoid running on PRs by default

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

alexcrichton created PR review comment:

You'll want to add this to the "join node" at the bottom of this file to ensure failure here blocks PRs/merging.

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

alexcrichton created PR review comment:

Personally I prefer to keep CI logic as simple as possible to make it easier to reproduce locally, could this all be codified in the tests/wast.rs file instead of in bash here? Something like a special env var which says "do this logic instead" or something like that which switches how the test is run

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

alexcrichton created PR review comment:

Instead of using a build script this can be specified declaratively here

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

alexcrichton created PR review comment:

Where possible, mind avoiding using #[cfg]? Here I think it'd be fine to just omit this since this looks fully const-propagatable.

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

alexcrichton created PR review comment:

Also, in terms of implementation, could this be ($($t:tt)*)) => { if cfg!(gc_zeal) { assert!($($t)*); } }? basically just wrap the syntax of assert! without specifying multiple arms

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

fitzgen submitted PR review.

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

fitzgen created PR review comment:

Oh nice, I missed that that was a thing

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

fitzgen submitted PR review.

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

fitzgen created PR review comment:

I'm not familiar with "gc zeal" in the spidermonkey sense so I don't have a great intuition here, but what's the benefit of this over debug_assert!?

These checks are too expensive for debug_assert!s. I wouldn't want to enable them for anyone doing debug builds which embed wasmtime, for example. They are really there only for fuzzing and/or when debugging GC heap corruption and such.

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

fitzgen submitted PR review.

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

fitzgen created PR review comment:

I wanted it to be a recognizable pattern when staring at things in gdb. Changed it to 0b00001111, which is still recognizable but less likely to accidentally conflict with other stuff.

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

fitzgen updated PR #12921.

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

alexcrichton submitted PR review.

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

fitzgen added PR #12921 Add "GC Zeal" infrastructure for additional, aggressive GC assertions to the merge queue.

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

fitzgen merged PR #12921.

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

fitzgen removed PR #12921 Add "GC Zeal" infrastructure for additional, aggressive GC assertions from the merge queue.


Last updated: Apr 12 2026 at 23:10 UTC