rust-fuzz / libfuzzer

Rust bindings and utilities for LLVM’s libFuzzer
Apache License 2.0
210 stars 44 forks source link

Arbitrary data #22

Closed nagisa closed 7 years ago

nagisa commented 7 years ago

Might be nice to have have something similar to quickcheck’s Arbitrary trait, so instead of always taking &[u8], we could make it take anything that implements some Arbitrary trait and provide a number of impls for such trait. (e.g. to fuzz with a String, to fuzz with an array of numbers of some type, to fuzz with something else)

Here the original &[u8] would be used as a source of “randomness”.

frewsxcv commented 7 years ago

Relevant comment by @eternaleye here https://github.com/rust-lang/rust/issues/39916#issuecomment-280794596

0xcpu commented 7 years ago

Great idea @nagisa ! That would be great!

frewsxcv commented 7 years ago

This was presumably done in https://github.com/rust-fuzz/libfuzzer-sys/pull/26