Expand modules instantiated in instantiate-wasm-smith
This commit uses the new `MaybeInvalidModule` type in `wasm-smith` to try to explore more points in the fuzz target space in the `instantiate-maybe-invalid` fuzz target. The goal here is to use the raw fuzz input as the body of a function to stress the validator/decoder a bit more, and try to get inputs we might not otherwise generate.
This commit is contained in:
@@ -17,7 +17,7 @@ target-lexicon = "0.10"
|
||||
peepmatic-fuzzing = { path = "../cranelift/peepmatic/crates/fuzzing", optional = true }
|
||||
wasmtime = { path = "../crates/wasmtime" }
|
||||
wasmtime-fuzzing = { path = "../crates/fuzzing" }
|
||||
wasm-smith = "0.1.3"
|
||||
wasm-smith = "0.1.5"
|
||||
|
||||
[[bin]]
|
||||
name = "compile"
|
||||
|
||||
15
fuzz/fuzz_targets/instantiate-maybe-invalid.rs
Normal file
15
fuzz/fuzz_targets/instantiate-maybe-invalid.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use std::time::Duration;
|
||||
use wasm_smith::Module;
|
||||
use wasmtime::Strategy;
|
||||
use wasmtime_fuzzing::oracles;
|
||||
|
||||
fuzz_target!(|module: MaybeInvalidModule| {
|
||||
oracles::instantiate_with_config(
|
||||
&module.to_bytes(),
|
||||
wasmtime_fuzzing::fuzz_default_config(Strategy::Auto),
|
||||
Some(Duration::from_secs(20)),
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user