Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple variables implementing the Arbitrary type to fuzz_target! #77

Open
wcampbell0x2a opened this issue May 6, 2021 · 3 comments

Comments

@wcampbell0x2a
Copy link

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

@frewsxcv
Copy link
Member

frewsxcv commented May 6, 2021

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

@frewsxcv
Copy link
Member

frewsxcv commented May 6, 2021

Relevant: rust-fuzz/cargo-fuzz#252

@raldone01
Copy link

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;
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants