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

fix(fuzz): Refactor fuzzers to fix off by 1 errors #7547

Merged
merged 1 commit into from
May 5, 2023

Conversation

nathaniel-brough
Copy link
Contributor

Cleanup the fuzzers making them more readable and fix off by one errors caused by incorrect usage of
FuzzedDataProvider::ConsumeIntegralInRange.

Closes: #7546

} else {
return cast(T, fdp.ConsumeIntegralInRange<int>(-RAND_MAX / 2, RAND_MAX / 2));
return cast(T, fdp.ConsumeIntegral<int>());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure about changing this line but I'm 80% sure it makes sense.

@nathaniel-brough nathaniel-brough force-pushed the fix_consume_integral branch 2 times, most recently from 7d92396 to e9e4eba Compare May 4, 2023 21:13
Cleanup the fuzzers making them more readable and fix
off by one errors caused by incorrect usage of
FuzzedDataProvider::ConsumeIntegralInRange.

Closes: halide#7546
@steven-johnson steven-johnson merged commit c86d418 into halide:main May 5, 2023
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
Cleanup the fuzzers making them more readable and fix
off by one errors caused by incorrect usage of
FuzzedDataProvider::ConsumeIntegralInRange.

Closes: halide#7546
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.

fuzz tests call ConsumeIntegralInRange() incorrectly
2 participants