diff options
author | Alon Zakai <azakai@google.com> | 2023-03-09 15:04:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 15:04:35 -0800 |
commit | 4f28d966f3366827fb1d19cd107203935135658b (patch) | |
tree | cf8584722f1b60317eb28c34eccb5757b0ef5e9d /test | |
parent | 819b7ce54d6c1f2032ab6fb28213126b49f61996 (diff) | |
download | binaryen-4f28d966f3366827fb1d19cd107203935135658b.tar.gz binaryen-4f28d966f3366827fb1d19cd107203935135658b.tar.bz2 binaryen-4f28d966f3366827fb1d19cd107203935135658b.zip |
Emit the fuzzer hashMemory function after modifications (#5558)
Previously we emitted it early, and would then modify it in random ways
like other initial content. But this function is called frequently during
execution, so if we were unlucky and modded that function to trap then
basically all other functions would trap as well.
After fixing this, some places assert on not having any functions or types
to pick a random one from, so fix those places too.
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/fuzz_metrics_noprint.bin.txt | 53 | ||||
-rw-r--r-- | test/passes/translate-to-fuzz_all-features_metrics_noprint.txt | 70 |
2 files changed, 59 insertions, 64 deletions
diff --git a/test/passes/fuzz_metrics_noprint.bin.txt b/test/passes/fuzz_metrics_noprint.bin.txt index 3077b858d..700359899 100644 --- a/test/passes/fuzz_metrics_noprint.bin.txt +++ b/test/passes/fuzz_metrics_noprint.bin.txt @@ -1,33 +1,34 @@ total - [exports] : 71 - [funcs] : 97 + [exports] : 59 + [funcs] : 86 [globals] : 9 [imports] : 4 [memories] : 1 [memory-data] : 2 - [table-data] : 29 + [table-data] : 34 [tables] : 1 [tags] : 0 - [total] : 9772 - [vars] : 262 - Binary : 728 - Block : 1590 - Break : 299 - Call : 459 - CallIndirect : 97 - Const : 1686 - Drop : 92 - GlobalGet : 775 - GlobalSet : 636 - If : 515 - Load : 166 - LocalGet : 671 - LocalSet : 502 - Loop : 201 - Nop : 111 - RefFunc : 29 - Return : 82 - Select : 87 - Store : 93 - Unary : 653 - Unreachable : 300 + [total] : 9333 + [vars] : 265 + Binary : 675 + Block : 1567 + Break : 310 + Call : 441 + CallIndirect : 68 + Const : 1667 + Drop : 68 + GlobalGet : 735 + GlobalSet : 594 + If : 514 + Load : 144 + LocalGet : 542 + LocalSet : 431 + Loop : 197 + Nop : 167 + RefFunc : 34 + Return : 84 + Select : 65 + Store : 80 + Switch : 2 + Unary : 660 + Unreachable : 288 diff --git a/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt b/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt index dc8be142a..cdbd4dd27 100644 --- a/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt +++ b/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt @@ -1,45 +1,39 @@ total - [exports] : 3 - [funcs] : 4 + [exports] : 4 + [funcs] : 8 [globals] : 5 [imports] : 5 [memories] : 1 [memory-data] : 20 [table-data] : 2 [tables] : 1 - [tags] : 0 - [total] : 682 - [vars] : 3 - AtomicCmpxchg : 1 - AtomicFence : 3 - AtomicNotify : 2 - Binary : 76 - Block : 105 - Break : 15 - Call : 5 - CallRef : 3 - Const : 170 - Drop : 3 - GlobalGet : 42 - GlobalSet : 41 - I31Get : 2 - I31New : 2 - If : 32 - Load : 16 - LocalGet : 23 - LocalSet : 19 - Loop : 16 - MemoryCopy : 1 - MemoryFill : 2 - MemoryInit : 2 - Nop : 23 - RefFunc : 7 - RefNull : 1 - Return : 5 - SIMDExtract : 2 - Select : 4 - Store : 3 - StructNew : 1 - TupleMake : 2 - Unary : 33 - Unreachable : 20 + [tags] : 1 + [total] : 526 + [vars] : 8 + Binary : 69 + Block : 74 + Break : 11 + Call : 10 + Const : 100 + Drop : 1 + GlobalGet : 32 + GlobalSet : 33 + I31Get : 1 + I31New : 3 + If : 23 + Load : 19 + LocalGet : 40 + LocalSet : 23 + Loop : 10 + Nop : 17 + RefAs : 2 + RefFunc : 5 + RefIsNull : 1 + RefNull : 3 + Return : 2 + Select : 1 + Store : 1 + StructNew : 2 + TupleMake : 3 + Unary : 23 + Unreachable : 17 |