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 fuzzing support #1632

Merged
merged 2 commits into from
Sep 6, 2019
Merged

Add fuzzing support #1632

merged 2 commits into from
Sep 6, 2019

Conversation

YaLTeR
Copy link
Collaborator

@YaLTeR YaLTeR commented Sep 5, 2019

Find assertion fails in your own rav1e clone in one simple command.

Closes #115, although new issues could be opened for adding, for example, proptest, or the randomizing RDO decisions thing.

The design I chose here (putting actual fuzzable functions inside the rav1e crate) should make it easy to hook up other fuzzers such as AFL and honggfuzz (more fuzzers more better), although it doesn't make it easy to hook up proptest or quickcheck because those frameworks want you to generate each individual parameter through them, rather than feeding in a chunk of random bytes (this is so that they can meaningfully shrink and expand the inputs, which is the whole point).

Additionally included is the ability to inspect crashing state straight through the fuzz target executables via the RUST_LOG=debug environment variable, which is extremely handy for figuring out what's up and making test cases.

Thus far trophies include everything fixed in #1619 and #1630 and a more-interesting case for #1611.

@YaLTeR YaLTeR requested a review from lu-zero September 5, 2019 00:06
@coveralls
Copy link
Collaborator

coveralls commented Sep 5, 2019

Coverage Status

Coverage remained the same at 70.965% when pulling 088153f on YaLTeR:fuzzing into cc170c2 on xiph:master.

src/fuzzing.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty and not too intrusive.

If you switch to the log crate to avoid the explicit debug variable it should get even more compact.

@YaLTeR
Copy link
Collaborator Author

YaLTeR commented Sep 5, 2019

Changed to use debug!().

@YaLTeR YaLTeR requested a review from lu-zero September 6, 2019 18:19
@lu-zero lu-zero changed the title Add fuzzing stuff Add fuzzing support Sep 6, 2019
Copy link
Collaborator

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems still good :)

@YaLTeR YaLTeR merged commit 7e9e7b3 into xiph:master Sep 6, 2019
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.

Add fuzz testing
5 participants