Subject: [Boost-bugs] [Boost C++ Libraries] #8575: boost::polygon::operators::operator* crashes on a specific pair of polygons
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-14 21:34:44
#8575: boost::polygon::operators::operator* crashes on a specific pair of polygons
------------------------------------+---------------------------------------
Reporter: ckozhukhin@⦠| Owner: ljsimons
Type: Bugs | Status: new
Milestone: To Be Determined | Component: polygon
Version: Boost 1.53.0 | Severity: Problem
Keywords: |
------------------------------------+---------------------------------------
The issue appears to be caused by int overflow - if I halve the value of
coordinates of both polygons operator* works correctly.
Polygon1: (-2147483646, -2147483646), (429496729, -2147483646),
(2147483646, 2147483646)
Polygon2: (-1288490188, -2147483646), (1288490188, -2147483646),
(1288490188, 2147483646), (-1288490188, 2147483646)
Code snippet:[[BR]]
{{{
namespace bp = boost::polygon;
using namespace boost::polygon::operators;
typedef bp::polygon_data<int> Polygon;
typedef bp::polygon_traits<Polygon>::point_type Point;
typedef std::vector<Polygon> PolygonSet;
...
Polygon p1 = makeBoostPolygon(...);
Polygon p2 = makeBoostPolygon(...);
PolygonSet ps1;
ps1 += p1;
PolygonSet ps2;
ps2 += p2;
PolygonSet intersection;
assign(intersection, ps1*ps2); // Crashes with access violation
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8575> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC