Update fuzz crates (#826)
* deps: Update to arbitrary 0.3.x and libfuzzer-sys 0.2.0 * ci: Use cargo-fuzz 0.7.x in CI
This commit is contained in:
committed by
Alex Crichton
parent
0be3c2983c
commit
adcc047f4a
@@ -31,13 +31,17 @@ impl fmt::Debug for WasmOptTtf {
|
||||
}
|
||||
|
||||
impl Arbitrary for WasmOptTtf {
|
||||
fn arbitrary<U>(input: &mut U) -> Result<Self, U::Error>
|
||||
where
|
||||
U: Unstructured + ?Sized,
|
||||
{
|
||||
fn arbitrary(input: &mut Unstructured) -> arbitrary::Result<Self> {
|
||||
let seed: Vec<u8> = Arbitrary::arbitrary(input)?;
|
||||
let module = binaryen::tools::translate_to_fuzz_mvp(&seed);
|
||||
let wasm = module.write();
|
||||
Ok(WasmOptTtf { wasm })
|
||||
}
|
||||
|
||||
fn arbitrary_take_rest(input: Unstructured) -> arbitrary::Result<Self> {
|
||||
let seed: Vec<u8> = Arbitrary::arbitrary_take_rest(input)?;
|
||||
let module = binaryen::tools::translate_to_fuzz_mvp(&seed);
|
||||
let wasm = module.write();
|
||||
Ok(WasmOptTtf { wasm })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user