Add a spec test fuzzer for Config (#1509)
* Add a spec test fuzzer for Config This commit adds a new fuzzer which is intended to run on oss-fuzz. This fuzzer creates and arbitrary `Config` which *should* pass spec tests and then asserts that it does so. The goal here is to weed out any accidental bugs in global configuration which could cause non-spec-compliant behavior. * Move implementation to `fuzzing` crate
This commit is contained in:
@@ -50,5 +50,11 @@ test = false
|
||||
doc = false
|
||||
required-features = ['binaryen']
|
||||
|
||||
[[bin]]
|
||||
name = "spectests"
|
||||
path = "fuzz_targets/spectests.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[features]
|
||||
binaryen = ['wasmtime-fuzzing/binaryen']
|
||||
|
||||
9
fuzz/fuzz_targets/spectests.rs
Normal file
9
fuzz/fuzz_targets/spectests.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use wasmtime_fuzzing::generators::{Config, SpecTest};
|
||||
|
||||
fuzz_target!(|pair: (Config, SpecTest)| {
|
||||
let (config, test) = pair;
|
||||
wasmtime_fuzzing::oracles::spectest(config, test);
|
||||
});
|
||||
Reference in New Issue
Block a user