diff --git a/fuzz/fuzz_targets/cranelift-fuzzgen.rs b/fuzz/fuzz_targets/cranelift-fuzzgen.rs index 859007c3a3..c0d2a2418b 100644 --- a/fuzz/fuzz_targets/cranelift-fuzzgen.rs +++ b/fuzz/fuzz_targets/cranelift-fuzzgen.rs @@ -104,15 +104,18 @@ fuzz_target!(|testcase: TestCase| { match int_res { RunResult::Success(_) => {} RunResult::Trap(_) => { - // We currently ignore inputs that trap the interpreter + // If this input traps, skip it and continue trying other inputs + // for this function. We've already compiled it anyway. + // // We could catch traps in the host run and compare them to the // interpreter traps, but since we already test trap cases with // wasm tests and wasm-level fuzzing, the amount of effort does // not justify implementing it again here. - return; + continue; } RunResult::Timeout => { - // We probably generated an infinite loop, we can ignore this + // We probably generated an infinite loop, we should drop this entire input. + // We could `continue` like we do on traps, but timeouts are *really* expensive. return; } RunResult::Error(_) => panic!("interpreter failed: {:?}", int_res),