-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "interposition" to the fuzzer's mutate() method (#6427)
Before this PR we only mutated by replacing an expression with another, which replaced all the children. With this PR we also do these two patterns: (A (B) (C) ) => ;; keep children, replace A (block (drop (B)) (drop (C)) (NEW) ) , (D (A (B) (C) ) ) => ;; keep A, replace it in the parent (D (block (drop (A (B) (C) ) ) (NEW) ) ) We also try to replace onto the new D (either A itself, or A's children).
- Loading branch information
Showing
3 changed files
with
216 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
total | ||
[exports] : 29 | ||
[funcs] : 39 | ||
[exports] : 18 | ||
[funcs] : 21 | ||
[globals] : 9 | ||
[imports] : 4 | ||
[memories] : 1 | ||
[memory-data] : 2 | ||
[table-data] : 6 | ||
[table-data] : 7 | ||
[tables] : 1 | ||
[tags] : 0 | ||
[total] : 5494 | ||
[vars] : 119 | ||
Binary : 400 | ||
Block : 892 | ||
Break : 210 | ||
Call : 232 | ||
CallIndirect : 12 | ||
Const : 898 | ||
Drop : 49 | ||
GlobalGet : 421 | ||
GlobalSet : 333 | ||
If : 289 | ||
Load : 113 | ||
LocalGet : 434 | ||
LocalSet : 306 | ||
Loop : 118 | ||
Nop : 85 | ||
RefFunc : 6 | ||
Return : 62 | ||
Select : 52 | ||
Store : 45 | ||
Switch : 1 | ||
Unary : 380 | ||
Unreachable : 156 | ||
[total] : 11685 | ||
[vars] : 64 | ||
Binary : 848 | ||
Block : 1846 | ||
Break : 456 | ||
Call : 275 | ||
CallIndirect : 117 | ||
Const : 1952 | ||
Drop : 86 | ||
GlobalGet : 844 | ||
GlobalSet : 679 | ||
If : 625 | ||
Load : 236 | ||
LocalGet : 1050 | ||
LocalSet : 764 | ||
Loop : 301 | ||
Nop : 143 | ||
RefFunc : 7 | ||
Return : 103 | ||
Select : 77 | ||
Store : 111 | ||
Switch : 3 | ||
Unary : 835 | ||
Unreachable : 327 |
74 changes: 44 additions & 30 deletions
74
test/passes/translate-to-fuzz_all-features_metrics_noprint.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,56 @@ | ||
total | ||
[exports] : 3 | ||
[funcs] : 6 | ||
[funcs] : 5 | ||
[globals] : 1 | ||
[imports] : 5 | ||
[memories] : 1 | ||
[memory-data] : 20 | ||
[table-data] : 1 | ||
[tables] : 1 | ||
[tags] : 2 | ||
[total] : 314 | ||
[vars] : 38 | ||
ArrayNew : 2 | ||
ArrayNewFixed : 1 | ||
[total] : 661 | ||
[vars] : 21 | ||
ArrayGet : 1 | ||
ArrayLen : 1 | ||
ArrayNew : 4 | ||
ArrayNewFixed : 6 | ||
AtomicFence : 1 | ||
Binary : 58 | ||
Block : 28 | ||
Break : 6 | ||
Call : 10 | ||
Const : 72 | ||
Drop : 3 | ||
GlobalGet : 10 | ||
GlobalSet : 10 | ||
AtomicRMW : 1 | ||
Binary : 87 | ||
Block : 78 | ||
Break : 17 | ||
Call : 11 | ||
Const : 125 | ||
DataDrop : 1 | ||
Drop : 7 | ||
GlobalGet : 26 | ||
GlobalSet : 26 | ||
I31Get : 1 | ||
If : 7 | ||
Load : 18 | ||
LocalGet : 36 | ||
LocalSet : 21 | ||
Loop : 1 | ||
Nop : 2 | ||
RefEq : 1 | ||
RefFunc : 2 | ||
RefI31 : 2 | ||
RefNull : 1 | ||
Return : 2 | ||
Select : 1 | ||
Store : 1 | ||
StructGet : 1 | ||
If : 24 | ||
Load : 22 | ||
LocalGet : 65 | ||
LocalSet : 38 | ||
Loop : 9 | ||
MemoryCopy : 1 | ||
Nop : 9 | ||
RefAs : 8 | ||
RefCast : 1 | ||
RefEq : 2 | ||
RefFunc : 1 | ||
RefI31 : 3 | ||
RefIsNull : 2 | ||
RefNull : 13 | ||
RefTest : 1 | ||
Return : 4 | ||
SIMDExtract : 3 | ||
SIMDLoad : 1 | ||
Select : 2 | ||
Store : 4 | ||
StructGet : 2 | ||
StructNew : 3 | ||
TupleMake : 2 | ||
Unary : 6 | ||
Unreachable : 5 | ||
Throw : 1 | ||
Try : 1 | ||
TupleExtract : 2 | ||
TupleMake : 5 | ||
Unary : 28 | ||
Unreachable : 13 |