Stream: git-wasmtime

Topic: wasmtime / PR #14276 [gc_fuzz]: Add non-null types


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

khagankhan opened PR #14276 from khagankhan:ctr to bytecodealliance:main:

The gc_ops fuzzer never generated non-nullable reference fields. Fixup forced every reference field to nullable, so the generator only ever emitted (ref null $t) and structref. This change lets non-nullable fields survive, so the fuzzer now exercises (ref $t) and (ref struct) as well.

Two design choices:

  1. Briefly, inhabitable proves types buildable by fixpoint, so anything it never admits is uninhabitable. fix_uninhabitable takes one such type per pass and relaxes only the fields that cannot be satisfied to nullable, then re-runs the analysis until every type is admitted. A nullable field can always be filled with ref.null, so relaxing one gives the cycle a base case, which usually unblocks several other types at once and leaves well founded non-nullable references untouched.

  2. emit_new builds a real object for non-null, pushing a value per field and ending with struct.new. emit_ref_to decides build versus reuse. Types costing 8 instructions or less are built fresh at every use, and anything more expensive gets one shared object per loop iteration held in a local and read back with local.get + ref.as_non_null. Building cheap types fresh keeps many distinct objects on the heap instead of every reference aliasing one while the prototype stop a deep graph from expanding exponentially.

P.S. I realized certain functions are very big (like fixup now). The next PR will be clean-up about these.

+cc @fitzgen

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

khagankhan requested alexcrichton for a review on PR #14276.

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

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

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

:memo: khagankhan submitted PR review.

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

:speech_balloon: khagankhan created PR review comment:

reports whether a field type has a default value. Only non-nullable references do not.

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

:memo: khagankhan submitted PR review.

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

:speech_balloon: khagankhan created PR review comment:

tells whether a field can be given a value using only a given set of buildable types. A non-nullable concrete reference needs its target in that set. A non-nullable need any non-array in that set.

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

:memo: khagankhan submitted PR review.

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

:speech_balloon: khagankhan created PR review comment:

this picks the buildable struct with the lowest round number. This is the struct built to fill a non-nullable (ref struct) field.

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

:memo: khagankhan submitted PR review.

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

:speech_balloon: khagankhan created PR review comment:

This decides which types get shared prototype. It costs each type as one instruction per field plus one using each referent's own cost and hoists anything over the budget that something actually points at. So when a nonnull struct needed a new one is created till total # is < 8 after that they were reused. This also may be considered "the first step" to places paradigm.

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

khagankhan updated PR #14276.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 04 2026 at 04:46):

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

view this post on Zulip Wasmtime GitHub notifications bot (Sep 04 2026 at 04:47):

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

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 (Sep 14 2026 at 18:46):

:thumbs_up: fitzgen submitted PR review:

LGTM, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 18:46):

fitzgen added PR #14276 [gc_fuzz]: Add non-null types to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 14 2026 at 19:13):

github-merge-queue[bot] removed PR #14276 [gc_fuzz]: Add non-null types from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 16 2026 at 20:38):

fitzgen added PR #14276 [gc_fuzz]: Add non-null types to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 16 2026 at 21:04):

:check: fitzgen merged PR #14276.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 16 2026 at 21:04):

fitzgen removed PR #14276 [gc_fuzz]: Add non-null types from the merge queue.


Last updated: Sep 20 2026 at 18:08 UTC