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 fuzzer for internal algos.c functions #675

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

isaacbrodsky
Copy link
Collaborator

This is intended to bring the fuzzer suite in uber/h3 to complete parity with what oss-fuzz is able to cover, since oss-fuzz also fuzzes the h3NeighborRotations internal function. Also I added a few advanced options which I hope will make oss-fuzz integration with the fuzzers here a little easier. google/oss-fuzz#8406

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.03% when pulling d85a9b2 on isaacbrodsky:fuzz-algos-internal into befff57 on uber:master.

@isaacbrodsky isaacbrodsky marked this pull request as ready for review September 6, 2022 17:29
Comment on lines +40 to +43
for (size_t i = 0; i < expectedSize; i += sizeof(zero)) {
if (fwrite(&zero, sizeof(zero), 1, fp) != 1) {
error("Error writing\n");
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was incorrectly reading garbage off the stack before.

Comment on lines +66 to +68
if (!fp) { \
error("Error opening test case file\n"); \
} \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This would unhelpfully segfault before.

@isaacbrodsky isaacbrodsky merged commit d8e8606 into uber:master Sep 6, 2022
@isaacbrodsky isaacbrodsky deleted the fuzz-algos-internal branch September 6, 2022 20:41
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.

4 participants