Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shresss
Copy link
Contributor

@shresss shresss commented Jun 5, 2025

Adds gridRing testing to fuzzerGridDisk.c to improve test coverage as requested in #1011 and as I tried but ran into merge issues with in #1012.

Adds gridRing testing to fuzzerGridDisk.c to improve test coverage
as requested in uber#1011 and as I tried but ran into merge issues with in uber#1012.
free(results);
results = calloc(sizeof(H3Index), sz);
if (results != NULL) {
H3_EXPORT(gridRing)(args->index, args->k, results); // Test the safe version
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
H3_EXPORT(gridRing)(args->index, args->k, results); // Test the safe version
H3_EXPORT(gridRing)(args->index, args->k, results); // Test the safe version

small formatting issue that will get flagged in CI

@coveralls
Copy link

coveralls commented Jun 5, 2025

Coverage Status

coverage: 98.804%. remained the same
when pulling e6ecdaa on shresss:gridring-clean
into 6be0899 on uber:master.

Comment on lines 59 to 63
results = calloc(sizeof(H3Index), sz);
if (results != NULL) {
H3_EXPORT(gridRing)(args->index, args->k, results); // Test the safe version
}
free(results);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe move the whole block to after gridRingUnsafe

@shresss
Copy link
Contributor Author

shresss commented Jun 5, 2025

move to below gridRingUnsafe and formating corrected!

H3_EXPORT(gridDiskUnsafe)(args->index, args->k, results);
}
free(results);
results = calloc(sizeof(H3Index), sz);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this line should also move down or there will be a use-after-free

@shresss
Copy link
Contributor Author

shresss commented Jun 5, 2025

fixed, sorry was working on issue #984 did this change a bit too quickly

@isaacbrodsky isaacbrodsky merged commit e4c977a into uber:master Jun 6, 2025
45 checks passed
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.

5 participants