Stream: git-wasmtime

Topic: wasmtime / PR #12931 gc_ops: Add support for struct subtypes


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

khagankhan opened PR #12931 from khagankhan:struct-subtyping-support to bytecodealliance:main:

Add struct subtype support

This adds is_final and supertype fields to SubType, enabling struct subtype hierarchies in the GC fuzzer.

Design change: DFS cycle breaking instead of SCC merging

The (unintentionally :/ ) deleted branch used SCC to find rec groups with cross-group supertype cycles and merge them. When I was analyzing the mutated modules, I saw that almost all groups end up in one huge merged group after a few iterations. The new approach runs a DFS on the rec-group dependency graph and drops only the supertype edges that form back edges, which is the minimum (apparently) needed to break cycles. Groups stay separate, and the cranelift-entity / StronglyConnectedComponents dependencies are removed. No SCC here at all.

Changes by file

mutator.rs

ops.rs

types.rs

tests.rs

Added tests for:

cc @fitzgen @eeide

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

khagankhan requested alexcrichton for a review on PR #12931.

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

khagankhan requested wasmtime-fuzz-reviewers for a review on PR #12931.

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

github-actions[bot] added the label fuzzing on PR #12931.

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

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

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "fuzzing"

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 21:32):

fitzgen submitted PR review:

Thanks! One small thing before we merge

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

fitzgen created PR review comment:

choose already returns an None when there are no options given to it, so we don't need to have the empty check here.

Also, we don't want to always generate supertypes. Better to do it with some probability, maybe a quarter of the time?

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

khagankhan submitted PR review.

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

khagankhan created PR review comment:

Oh cool! I wanted to do that because we already remove supertypes in cycle-checks so in the end we still end up with structs without supertypes. But I agree probability would be better since.

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

khagankhan edited PR review comment.

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

khagankhan updated PR #12931.

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

khagankhan commented on PR #12931:

Thanks @fitzgen! Ready for review!

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

khagankhan updated PR #12931.

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

fitzgen submitted PR review:

Thanks!

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

fitzgen added PR #12931 gc_ops: Add support for struct subtypes to the merge queue.

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

fitzgen removed PR #12931 gc_ops: Add support for struct subtypes from the merge queue.

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

fitzgen merged PR #12931.


Last updated: Apr 13 2026 at 00:25 UTC