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

use a not-cryptographic rng for input generator #217

Merged
merged 1 commit into from
May 30, 2024
Merged

Conversation

camshaft
Copy link
Owner

@camshaft camshaft commented May 30, 2024

We're currently using the StdRng for the random engine. Under the hood, this is chacha12, which is overkill for purposes of generating random inputs. This change switches the RNG implementation to use Xoshiro256PlusPlus, which is covered in the rand guide to have a good tradeoff of speed and quality.

Additionally, I simplified the bolero_generator::uniform::Uniform trait implementations a bit, which should hopefully result in better coverage. Before we were branching on if we were in direct mode or not. In practice, coverage-based fuzzing engines spend a lot of time generating inputs rather than executing the tests and direct mode makes that even worse. As such, the uniform impls now always ignore the mode and behave as if forced. In various testing, this improves testing throughput rates.

@camshaft camshaft marked this pull request as ready for review May 30, 2024 06:58
@camshaft camshaft merged commit f91cc10 into master May 30, 2024
6 of 9 checks passed
@camshaft camshaft deleted the fast-rng branch May 30, 2024 06:58
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