Skip to content

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

return cast(T, fdp.ConsumeIntegralInRange<int>(-128, 127));
} 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