-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
cargo afl build --release && cargo afl fuzz -i in -o out ../target/release/afl-fuzz -g 10k | ||
export AFL_AUTORESUME=1 | ||
cargo afl build --release && cargo afl fuzz -i in -o out -g $(cargo run --bin check_input_size) ../target/release/afl-fuzz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! Finds out how many bytes of data have to be provided to build the mock state. | ||
use arbitrary::Arbitrary; | ||
use vm2::{MockWorld, VirtualMachine}; | ||
|
||
fn main() { | ||
let data = [2; 10000]; | ||
let mut u = arbitrary::Unstructured::new(&data); | ||
let _: VmAndWorld = u.arbitrary().unwrap(); | ||
println!("{:?}", u.len()); | ||
} | ||
|
||
#[derive(Arbitrary, Debug)] | ||
struct VmAndWorld { | ||
_vm: VirtualMachine, | ||
_world: MockWorld, | ||
} |