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 polygonToCellsNoHoles fuzzer #557

Merged
merged 36 commits into from
Jan 23, 2022

Conversation

isaacbrodsky
Copy link
Collaborator

Based on #553. This adds a second fuzzer for polygonToCells which does not require the fuzzer to guess the correct number of cells.

@coveralls
Copy link

coveralls commented Jan 11, 2022

Coverage Status

Coverage increased (+0.005%) to 98.147% when pulling c20e860 on isaacbrodsky:llvm-fuzzer-polygon-to-cells-2 into 9330ee1 on uber:master.

geoPolygon.numHoles = 0;
geoPolygon.holes = NULL;
geoPolygon.geoloop.numVerts = numVerts;
geoPolygon.geoloop.verts = (LatLng *)(data + 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

For my info - why + 1? Oh, because the first uint_8 is the res? Might be worth a comment.

I imagine that most fuzzer runs would error quickly on an invalid res here, and never exercise the polyfill...

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 is still better than fuzzerPoylgonToCells.c which is very difficult for the fuzzer to make progress on; here it only needs to guess one byte correctly (polygonToCells actually takes an int but I don't think that's quite as relevant) which I believe is very doable.

@isaacbrodsky isaacbrodsky merged commit e21b97a into uber:master Jan 23, 2022
@isaacbrodsky isaacbrodsky deleted the llvm-fuzzer-polygon-to-cells-2 branch January 23, 2022 17:49
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.

None yet

4 participants