boostorg / boostorg/polygon

Signed integer overflow in scan_arbitrary.hpp

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

Description

Undefined behaviour sanitizer on Linux with Clang complains about this:

When "Unit" is int, a call to validate_scan in Line 148 causes a "std::numeric_limits::min -1" in line 174

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in scan_arbitrary.hpp at validate_scan around lines 148 and 174, and reproduce the UBSan report with Clang on Linux. Trace the signed-integer minimum-value calculation and verify that the validation no longer triggers undefined behavior while retaining its intended checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.