Skip to content

Commit 8e965ee

Browse files
authored
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 * WebAssembly/function-references#98
1 parent 68ea69f commit 8e965ee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/fuzz_opt.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ def randomize_fuzz_settings():
181181
FUZZ_OPTS += ['--legalize-js-interface']
182182
else:
183183
LEGALIZE = False
184+
185+
# if GC is enabled then run --dce at the very end, to ensure that our
186+
# binaries validate in other VMs, due to how non-nullable local validation
187+
# and unreachable code interact. see
188+
# https://github.com/WebAssembly/binaryen/pull/5665
189+
# https://github.com/WebAssembly/binaryen/issues/5599
190+
if '--disable-gc' not in FEATURE_OPTS:
191+
FUZZ_OPTS += ['--dce']
192+
184193
print('randomized settings (NaNs, OOB, legalize):', NANS, OOB, LEGALIZE)
185194

186195

0 commit comments

Comments
 (0)