afl.rs icon indicating copy to clipboard operation
afl.rs copied to clipboard

separate binary and lib or their deps

Open Trolldemorted opened this issue 6 years ago • 5 comments

Right now it is cumbersome to fuzz libs that depend on afl.rs' dependencies, because they may require different versions.

Since the lib only offers two functions and uses nothing of the dependencies (?), I think we don't need them to be included in fuzz targets.

Trolldemorted avatar Jan 12 '18 00:01 Trolldemorted

which dependencies are you referring to? some of them get used in the cargo-afl binary. in what ways do you find working with the dependencies cumbersome?

frewsxcv avatar Jan 13 '18 23:01 frewsxcv

We are fuzzing something also depending on clap, but a completely different version.

Since the fuzz target does not need clap we cloned afl.rs, removed everything cargo-afl related, built our fuzz-target, and ran it with cargo afl from crates.io.

Trolldemorted avatar Jan 14 '18 00:01 Trolldemorted

Relevant cargo issue https://github.com/rust-lang/cargo/issues/1982

frewsxcv avatar Jan 14 '18 02:01 frewsxcv

For what it's worth, you don't need to add 'afl' as a dependency in your cargo.toml. you should be able to just copy and paste these functions into your fuzz target

frewsxcv avatar Jan 14 '18 02:01 frewsxcv

depending on a local, purged clone of afl.rs also works like a charm, we just wanted to let you know

Trolldemorted avatar Jan 14 '18 10:01 Trolldemorted