From 81dbc52c446680469a5e00e4e26b091bfc266a59 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 20 Nov 2024 08:23:14 -0800 Subject: Fuzzer: Legalize and prune the JS interface in pickPasses (#7092) Also add a test that the ClusterFuzz run.py does not warn, which was helpful when debugging this. --- src/tools/fuzzing/fuzzing.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/tools/fuzzing/fuzzing.cpp') diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index 135e50393..a283aae91 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -270,6 +270,13 @@ void TranslateToFuzzReader::pickPasses(OptimizationOptions& options) { options.passOptions.closedWorld = true; } + // Prune things that error in JS if we call them (like SIMD), some of the + // time. This alters the wasm/JS boundary quite a lot, so testing both forms + // is useful. + if (oneIn(2)) { + options.passes.push_back("legalize-and-prune-js-interface"); + } + // Usually 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 fuzz_opt.py and -- cgit v1.2.3