boostorg / boostorg/polygon

1.71.0 polygon operation crashed due to 64bit integer overflow

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
70
Forks
75
PR merge metrics
No merged PRs in 30d

Description

In 1.71.0, the coordinate_traits specialized for polygon_long_long_type. On 64bit platform, when checking one point is above or below a line for arbitrary formation, it involves 64bit integer multiplication. When input geometry coordinate is really big, this operation can lead to 64bit integer overflow and caused crash.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the coordinate_traits specialization for polygon_long_long_type and the point-above-or-below-line check used for arbitrary formation. Reproduce the failure with very large coordinates on a 64-bit platform, then trace the multiplication involved. Done means the operation no longer crashes or overflows for that input and has regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.