Skip to content

[gc_fuzz]: Add new GC ops to the fuzzer setup - #14196

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

[gc_fuzz]: Add new GC ops to the fuzzer setup#14196
khagankhan wants to merge 2 commits into
bytecodealliance:mainfrom
khagankhan:array-ops

Conversation

@khagankhan

Copy link
Copy Markdown
Contributor

This PR adds new GC ops to the existing setup.

  • `array.fill'
  • array.copy
  • array.new_elem
  • array.new_fixed

+cc @fitzgen

@khagankhan
khagankhan requested a review from a team as a code owner August 24, 2026 18:59
@khagankhan
khagankhan requested review from fitzgen and removed request for a team August 24, 2026 18:59
@khagankhan khagankhan changed the title [gc_fuzz]: Add new GC ops to the fuzzer setup #1. [gc_fuzz]: Add new GC ops to the fuzzer setup #PR1. Aug 24, 2026
@khagankhan khagankhan changed the title [gc_fuzz]: Add new GC ops to the fuzzer setup #PR1. [gc_fuzz]: Add new GC ops to the fuzzer setup Aug 24, 2026
@github-actions github-actions Bot added the fuzzing Issues related to our fuzzing infrastructure label Aug 24, 2026
@github-actions

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.

@fitzgen fitzgen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good but confused about one part below

Comment on lines -485 to +512
for i in 0..concrete_count {
let concrete = struct_type_base + i;
local_decls.push((
1,
ValType::Ref(RefType {
nullable: true,
heap_type: wasm_encoder::HeapType::Concrete(concrete),
}),
));
let typed_local2_base: u32 = typed_local_base + concrete_count;
for _ in 0..2 {
for i in 0..concrete_count {
let concrete = struct_type_base + i;
local_decls.push((
1,
ValType::Ref(RefType {
nullable: true,
heap_type: wasm_encoder::HeapType::Concrete(concrete),
}),
));
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the purpose of this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This second bank of locals is for array.copy. Because both operands can be the same concrete array type and array.copy traps on Null it needs two locals for src and dst when checking. I

P.S. It also does it for struct locals too but I did not want to "separate" arrays from structs atm.

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.

2 participants