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 Clang sanitizer checks in CI #711

Merged
merged 5 commits into from
Oct 13, 2022

Conversation

isaacbrodsky
Copy link
Collaborator

No description provided.

@coveralls
Copy link

coveralls commented Oct 12, 2022

Coverage Status

Coverage decreased (-0.05%) to 98.993% when pulling 54be89e on isaacbrodsky:fsanitize-in-ci into 59a4196 on uber:master.

{0.659966917655, -2.1364398519395},
{0.659966917655, -2.1364398519396}};
{0.659966917656, -2.1364398519395},
{0.659966917657, -2.1364398519396}};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did these need to be changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Possibly they didn't need to - I was trying to adjust some test cases to get better coverage although I don't think I really accomplished that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My mistake, they do need to be changed because as defined this is a straight line. polygonToCells will reject straight lines now - even if a cell centroid is along the line - because it would have attempted to divide by zero when estimating.

double a = d * d / fmin(3.0, fabs((p1.lng - p2.lng) / (p1.lat - p2.lat)));
double lngDiff = p1.lng - p2.lng;
double latDiff = p1.lat - p2.lat;
if (lngDiff == 0 || latDiff == 0) {
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, how are NAN and Infinity values handled here? Do we need to check for something like isFinite as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

isfinite is checked below

@nrabinowitz
Copy link
Collaborator

Does this supersede #710?

@isaacbrodsky
Copy link
Collaborator Author

Does this supersede #710?

No, that PR appears to be addressing a different issue in the ratio calculation, it doesn't address the divide by zero problem.

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