Rethink API
Would be nice to make this library simpler to use. I've been thinking an API like this:
use afl;
fn main() {
// Some setup can happen here
// Loop that AFL will run
afl::run(|inputted_string| {
let _ = some_library::parse_string(inputted_string);
});
}
inputted_string would be a String. the closure inside afl::run is the only thing that gets run upon every subsequent call by AFL using the deferred init strategy
Another idea here. Something like cargo bench:
#[fuzz]
fn test_fuzz(bytes: Vec<u8>) {
...
}
which can be invoked with something like cargo afl-fuzz
Nice! even simpler, I love it.
On Sat, Apr 23, 2016 at 11:44 AM, Corey Farwell [email protected] wrote:
Another idea here. Something like cargo bench:
#[fuzz]fn test_fuzz(bytes: Vec
) { ... } which can be invoked with something like cargo afl-fuzz
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/frewsxcv/afl.rs/issues/31#issuecomment-213767532
"I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: D1B3 ADC0 E023 8CA6
Note to future self:
rust-quickcheck implements a #[quickcheck] compiler plugin very similar to what I was thinking above.