Expand description
Fuzz a closure by passing it a &[u8]
This slice contains a “random” quantity of “random” data.
For perstistent fuzzing to work, you have to call it ad vita aeternam in an infinite loop.
The closure is assumed to be unwind-safe, which might be unsafe. For more info, check the
std::panic::UnwindSafe
trait.
ⓘ
loop {
fuzz(|data|{
if data.len() != 6 {return}
if data[0] != b'q' {return}
if data[1] != b'w' {return}
if data[2] != b'e' {return}
if data[3] != b'r' {return}
if data[4] != b't' {return}
if data[5] != b'y' {return}
panic!("BOOM")
});
}