khagankhan opened PR #13609 from khagankhan:i32-eqref to bytecodealliance:main:
Add
i31refsupport and eqref upcasts to thegc_opsfuzzerExtends the
gc_opsfuzz generator (which previously coveredexternref,
structref, andeqref) withi31refand abstract-eqrefupcasts.
i31reffields/locals/globals/tables — newFieldType::I31Ref, plus an
i31 local, global, and table threaded through the encoded module.New ops:
NullI31,RefI31 { value }— create i31 references.I31LocalGet/Set,I31GlobalGet/Set,I31TableGet/Set.
I31GetS/I31GetU— null-guarded (these instructions trap on null,
which the oracle would otherwise reject).
StructRefAsEq,TypedStructRefAsEq { type_index },I31RefAsEq— upcast
abstract/concrete struct refs and i31 refs to abstracteqref(implicit
Wasm subtyping; no instruction emitted, only the abstract stack type
changes).Host imports: new
take_i31import (the existingtake_eqalready
covered eqref).Differential check:
TakeI31Callpasses the i31ref plus the guest's
inlinei31.get_s/i31.get_uresults to the host, which re-derives them
(I31::get_i32()/get_u32()) and asserts they match the Wasm
instructions.+cc @fitzgen @eeide
khagankhan requested wasmtime-fuzz-reviewers for a review on PR #13609.
khagankhan requested alexcrichton for a review on PR #13609.
alexcrichton requested fitzgen for a review on PR #13609.
alexcrichton unassigned alexcrichton from PR #13609 [gc_fuzz]: Add and complete i31.
:thumbs_up: fitzgen submitted PR review:
Thanks!
:speech_balloon: fitzgen created PR review comment:
I added a new misc. item to https://github.com/bytecodealliance/wasmtime/issues/10327 as a follow up, because it doesn't need to happen in this PR, but we should really support multiple locals/globals/tables for the various types we are working with.
fitzgen added PR #13609 [gc_fuzz]: Add and complete i31 to the merge queue.
github-merge-queue[bot] removed PR #13609 [gc_fuzz]: Add and complete i31 from the merge queue.
khagankhan commented on PR #13609:
Working on the failure
khagankhan updated PR #13609.
khagankhan commented on PR #13609:
Should be good
:thumbs_up: fitzgen submitted PR review.
fitzgen added PR #13609 [gc_fuzz]: Add and complete i31 to the merge queue.
github-merge-queue[bot] removed PR #13609 [gc_fuzz]: Add and complete i31 from the merge queue.
khagankhan commented on PR #13609:
@fitzgen I assume the new failure is not related to our changes in this PR?
github-actions[bot] added the label fuzzing on PR #13609.
github-actions[bot] commented on PR #13609:
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:
- fitzgen: fuzzing
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen added PR #13609 [gc_fuzz]: Add and complete i31 to the merge queue.
:check: fitzgen merged PR #13609.
fitzgen removed PR #13609 [gc_fuzz]: Add and complete i31 from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC