fuzzgen: Continue execution on traps (#4895)

This commit is contained in:
Afonso Bordado
2022-09-12 17:10:49 +01:00
committed by GitHub
parent bb3aae740a
commit 555309a480

View File

@@ -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),