segfault in polygon_set_data<int>::get
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Start with the reproducer in issue #36, compiling it against boost/polygon/polygon.hpp and running the polygon_set.get(output) call. Trace the polygon_set_data::get path for the three inserted triangles; done means the program no longer segfaults and produces a valid output vector.
Written by the indexing model from the issue text.
Description
The following program crashes with a segmentation fault inside the get() call. I've tested against 1.65, 1.72, and current master. I'm pretty sure that this usage falls inside the API contract, but perhaps I'm missing something?
#include <boost/polygon/polygon.hpp>
int main(int argc, char **argv) {
const boost::polygon::point_data<int> triangles[][3] = {
{{-7273739,1362950}, {-7273144,1362356}, {-3077455,-2833333}},
{{-490017,-3840545}, {-2888380,-1442182}, {-6168936,1838374}},
{{-3078718,-2832071}, {-3078274,-2832514}, {-2288161,-2042401}},
};
boost::polygon::polygon_set_data<int> polygon_set;
polygon_set.insert(boost::polygon::polygon_data<int>(std::begin(triangles[0]), std::end(triangles[0])));
polygon_set.insert(boost::polygon::polygon_data<int>(std::begin(triangles[1]), std::end(triangles[1])));
polygon_set.insert(boost::polygon::polygon_data<int>(std::begin(triangles[2]), std::end(triangles[2])));
std::vector<boost::polygon::polygon_with_holes_data<int>> output;
polygon_set.get(output);
}
- Dominant language
- C++
- Stars
- 70
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/polygon
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in boostorg/polygon
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·