rust-fuzz/libfuzzer

Add multiple variables implementing the `Arbitrary` type to `fuzz_target!`

wcampbell0x2a opened this issue · 3 comments

A possible upgrade would be the ability for creating multiple variables that are to be fuzzed from the same data in the fuzz_target macro.

Something like this?

fuzz_target!(|rgb: Rgb, other: Other| {})

That, or have another macro named fuzz_targets

As a short term fix you can wrap both variables in a tuple

fuzz_target!(|(rgb, other): (Rgb, Other)| {})

Unexpectely the above syntax also doesn't work.

I used this to work around the issue:

fuzz_target!(|data: (Rgb, Other)| {
let (rbg, other) = data;
})