Skip to content

[gc_fuzz]: Extend everything we have done so far to array types#13847

Open
khagankhan wants to merge 2 commits into
bytecodealliance:mainfrom
khagankhan:array
Open

[gc_fuzz]: Extend everything we have done so far to array types#13847
khagankhan wants to merge 2 commits into
bytecodealliance:mainfrom
khagankhan:array

Conversation

@khagankhan

Copy link
Copy Markdown
Contributor
  • types.rs: CompositeType::Array with a reused StructField element. Full array-to-array subtyping (element covariance/invariance, forced element-compatibility in fixup). Cross-kind supertype edges (struct<->array) are cleared. StackType::Array wired into operand satisfaction, eqref upcast, and cast repair.
  • ops.rs: a full mirror of the struct op family for arrays, plus array-specific ArrayNew (fixed-length array.new_default), ArrayGet/ArraySet, and ArrayLen. Accesses are null-guarded and use index % (array_length + 1) so out-of-bounds traps are exercised but rare. A same-kind index remap keeps struct ops off array types (and vice versa) now that both share one type-index space.
  • mutator.rs: array generation, element mutation, and generic rec-group duplication.
  • oracles.rs: take_array + typed take_array_N imports, and Trap::ArrayOutOfBounds added to the accepted-trap allowlist.
  • limits.rs: a fuzzable array_length knob (1..=16, default 5).
  • config.rs: Config::to_store() could panic in Engine::new() for pooling + GC configs. The GC-heap backing memory rounds its minimum size up to a 64 KiB wasm page, but the harness clamped gc_heap_initial_size to max_memory_size in raw bytes — so a non-page-aligned max_memory_size let the rounded-up minimum overshoot the pool's per-memory limit, and Engine::new (correctly) rejected the config, which to_store().unwrap() turned into a crash. Fixed by clamping the initial size to max_memory_size rounded down to a page.

+cc @fitzgen @eeide

@khagankhan khagankhan requested a review from a team as a code owner July 8, 2026 21:52
@khagankhan khagankhan requested review from alexcrichton and removed request for a team July 8, 2026 21:52
@alexcrichton alexcrichton requested review from fitzgen and removed request for alexcrichton July 8, 2026 22:20
@github-actions github-actions Bot added the fuzzing Issues related to our fuzzing infrastructure label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

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 .github/subscribe-to-label.json configuration file.

Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant