Fix fuzzer expectation about valid modules

Recent changes to fuzzers made expectations more strict about handling
errors while fuzzing, but this erroneously changed a module compilation
step to always assume that the input wasm is valid. Instead a flag is
now passed through indicating whether the wasm blob is known valid or
invalid, and only if compilation fails and it's known valid do we panic.
This commit is contained in:
Alex Crichton
2020-12-14 08:03:45 -08:00
parent 8f7f8ee0b4
commit 42adeba65d
6 changed files with 25 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ use wasmtime_fuzzing::oracles;
fuzz_target!(|module: MaybeInvalidModule| {
oracles::instantiate_with_config(
&module.to_bytes(),
false,
wasmtime_fuzzing::fuzz_default_config(Strategy::Auto).unwrap(),
Some(Duration::from_secs(20)),
);