[gc_fuzz]: Add new GC ops to the fuzzer setup - #14196
Conversation
Subscribe to Label Actioncc @fitzgen DetailsThis 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 |
| 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), | ||
| }), | ||
| )); | ||
| } |
There was a problem hiding this comment.
I don't understand the purpose of this change?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Can you split this method up into some smaller helpers and add comments and such in a follow up PR? It's pretty big at this point and it isn't immediately clear to readers what is happening.
This PR adds new GC ops to the existing setup.
array.copyarray.new_elemarray.new_fixed+cc @fitzgen