rust-fuzz / libfuzzer

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

Very slow performances when asking an `Arbitrary` implementation to fuzz_target #107

Closed Tpt closed 1 year ago

Tpt commented 1 year ago

Thank you so much for this amazing library!

Sorry for polluting your bug tracker with a question.

This change doing an explicit T::arbitrary call inside of fuzz_target!(arg: &[u8] instead of just using fuzz_target!(arg: T seems to allow the fuzzer to try ~500x more valid inputs: https://github.com/oxigraph/oxigraph/pull/509

Is there a reason why fuzz_target!(arg: T could be way slower than fuzz_target!(arg: &[u8] { let arg = T::arbitrary(&mut Unstructured::new(data));?

Tpt commented 1 year ago

Thanks to @adamreichold for the explanation on https://github.com/oxigraph/oxigraph/pull/509