Limit rayon to one thread during fuzzing

This should enable more deterministic execution.
This commit is contained in:
Nick Fitzgerald
2020-02-28 16:32:06 -08:00
parent 99a37a7e61
commit 4866fa0e6a
6 changed files with 40 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ impl fmt::Debug for WasmOptTtf {
impl Arbitrary for WasmOptTtf {
fn arbitrary(input: &mut Unstructured) -> arbitrary::Result<Self> {
crate::init_fuzzing();
let seed: Vec<u8> = Arbitrary::arbitrary(input)?;
let module = binaryen::tools::translate_to_fuzz_mvp(&seed);
let wasm = module.write();
@@ -39,6 +40,7 @@ impl Arbitrary for WasmOptTtf {
}
fn arbitrary_take_rest(input: Unstructured) -> arbitrary::Result<Self> {
crate::init_fuzzing();
let seed: Vec<u8> = Arbitrary::arbitrary_take_rest(input)?;
let module = binaryen::tools::translate_to_fuzz_mvp(&seed);
let wasm = module.write();