summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-04-19 10:37:45 -0700
committerGitHub <noreply@github.com>2023-04-19 10:37:45 -0700
commit8e965ee29a12ce6d5ba2d2fc5d8a51b75b42ad73 (patch)
tree31b867591682c0af5da883b7dd501a0b1a2fd236
parent68ea69fc14165b715fc1eff886b0b0ba0025a85e (diff)
downloadbinaryen-8e965ee29a12ce6d5ba2d2fc5d8a51b75b42ad73.tar.gz
binaryen-8e965ee29a12ce6d5ba2d2fc5d8a51b75b42ad73.tar.bz2
binaryen-8e965ee29a12ce6d5ba2d2fc5d8a51b75b42ad73.zip
Fuzzer: Run --dce when GC is enabled (#5677)
DCE at the end avoids issues with non-nullable local operations in unreachable code, which is still being discussed. This PR avoids fuzzer errors for now, but we should revert it when we have a proper fix. See * #5599 * #5665 * https://github.com/WebAssembly/function-references/issues/98
-rwxr-xr-xscripts/fuzz_opt.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py
index 25d06c148..03334ffa7 100755
--- a/scripts/fuzz_opt.py
+++ b/scripts/fuzz_opt.py
@@ -181,6 +181,15 @@ def randomize_fuzz_settings():
FUZZ_OPTS += ['--legalize-js-interface']
else:
LEGALIZE = False
+
+ # if GC is enabled then run --dce at the very end, to ensure that our
+ # binaries validate in other VMs, due to how non-nullable local validation
+ # and unreachable code interact. see
+ # https://github.com/WebAssembly/binaryen/pull/5665
+ # https://github.com/WebAssembly/binaryen/issues/5599
+ if '--disable-gc' not in FEATURE_OPTS:
+ FUZZ_OPTS += ['--dce']
+
print('randomized settings (NaNs, OOB, legalize):', NANS, OOB, LEGALIZE)