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

Adjust for changed error types in arbitrary crate #15

Merged
merged 1 commit into from Nov 29, 2018
Merged

Adjust for changed error types in arbitrary crate #15

merged 1 commit into from Nov 29, 2018

Conversation

ghost
Copy link

@ghost ghost commented Nov 28, 2018

The current version 0.2 of the arbitrary crate seems to have changed
some error types so that the current code that is generated by the fuzz!
macro does not compile.

This changes the code to be independent of the errors types and also
adds arbitrary as a re-exported dependency so that its usage is fully
transparent to users of this crate.

@ghost ghost mentioned this pull request Nov 29, 2018
The current version 0.2 of the arbitrary crate seems to have changed
some error types so that the current code that is generated by the fuzz!
macro does not compile.

This changes the code to be independent of the errors types and also
adds arbitrary as a re-exported dependency so that its usage is fully
transparent to users of this crate.
@PaulGrandperrin
Copy link
Member

Hi @adam-rhebo, thanks for this PR!
closes #13
bors r+

bors bot added a commit that referenced this pull request Nov 29, 2018
15: Adjust for changed error types in arbitrary crate r=PaulGrandperrin a=adam-rhebo

The current version 0.2 of the arbitrary crate seems to have changed
some error types so that the current code that is generated by the fuzz!
macro does not compile.

This changes the code to be independent of the errors types and also
adds arbitrary as a re-exported dependency so that its usage is fully
transparent to users of this crate.

Co-authored-by: Adam Reichold <[email protected]>
@bors
Copy link
Contributor

bors bot commented Nov 29, 2018

Build succeeded

@bors bors bot merged commit a8b2f5e into rust-fuzz:master Nov 29, 2018
@PaulGrandperrin
Copy link
Member

@adam-rhebo I just released 0.5.34 with your PR merged!

@ghost
Copy link
Author

ghost commented Nov 29, 2018

@adam-rhebo I just released 0.5.34 with your PR merged!

Thank you very much!

@ghost
Copy link
Author

ghost commented Nov 29, 2018

@PaulGrandperrin Sorry if I hijack this thread: But I just noticed something when testing this: When I noticed this not working with the current arbitrary, I open-coded the this but used FiniteBuffer instead of RingBuffer to create Vec<Vec<u8>>. The same fuzz target got around 10000 iterations per second with that approach, but running it now using RingBuffer I only get around 100 iterations per second. Could that be because FiniteBuffer just fails to create these vector of vectors when "the numbers don't match" and I now see the real speed without the early returns or is there some fundamental difference to how these work?

@ghost ghost deleted the arbitrary-error-types branch November 29, 2018 17:57
@ghost
Copy link
Author

ghost commented Nov 29, 2018

(I guess I should rather generate [Vec<u8>; N] to avoid this getting out of hand. With that approach, my iterations are back to normal.)

This pull request was closed.
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

Successfully merging this pull request may close these issues.

1 participant