New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink API #31

Open
frewsxcv opened this Issue Jan 26, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@frewsxcv
Member

frewsxcv commented Jan 26, 2016

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

@frewsxcv

This comment has been minimized.

Show comment
Hide comment
@frewsxcv

frewsxcv Apr 23, 2016

Member

Another idea here. Something like cargo bench:

#[fuzz]
fn test_fuzz(bytes: Vec<u8>) {
    ...
}

which can be invoked with something like cargo afl-fuzz

Member

frewsxcv commented Apr 23, 2016

Another idea here. Something like cargo bench:

#[fuzz]
fn test_fuzz(bytes: Vec<u8>) {
    ...
}

which can be invoked with something like cargo afl-fuzz

@alex

This comment has been minimized.

Show comment
Hide comment
@alex

alex Apr 23, 2016

Contributor

Nice! even simpler, I love it.

On Sat, Apr 23, 2016 at 11:44 AM, Corey Farwell notifications@github.com
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
#31 (comment)

"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

Contributor

alex commented Apr 23, 2016

Nice! even simpler, I love it.

On Sat, Apr 23, 2016 at 11:44 AM, Corey Farwell notifications@github.com
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
#31 (comment)

"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

@frewsxcv

This comment has been minimized.

Show comment
Hide comment
@frewsxcv

frewsxcv May 2, 2016

Member

Note to future self:

rust-quickcheck implements a #[quickcheck] compiler plugin very similar to what I was thinking above.

example of usage

compiler plugin source

Member

frewsxcv commented May 2, 2016

Note to future self:

rust-quickcheck implements a #[quickcheck] compiler plugin very similar to what I was thinking above.

example of usage

compiler plugin source

PaulGrandperrin added a commit to rust-fuzz/honggfuzz-rs that referenced this issue Feb 9, 2018

Change fuzzing API to mimic upstream's HF_ITER style
The library code is now a lot simpler, does not use macros
and gives users a lot more control.

This solves cargo-fuzz's issue rust-fuzz/cargo-fuzz#101

This syntax is also very similar to the one in AFL.rs.
Maybe we should converge to a compatible API? rust-fuzz/afl.rs#31

PaulGrandperrin added a commit to PaulGrandperrin/afl.rs that referenced this issue Apr 27, 2018

Implement persistent mode with new function fuzz()
Performance goes from ~2200/s to 17000/s on my i7-7700HQ
while fuzzing the `url_read` target.

closes #131
partially addresses #31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment