#1002: assertion failures with VS2017 / VS2019 ------------------------+-------------------------- Reporter: dbaston | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: 3.8.1 Component: Default | Version: 3.8.0 Severity: Unassigned | Keywords: ------------------------+-------------------------- Reported by Asa Packer:
> If I build in Debug mode, with either VS2017 or VS2019, I get tons of assertion failures when I do ctest. They all come from line 115 of MonotoneChainBuilder.cpp, which on the last time through the loop causes an access of an element one past the end of a std::vector. Even if I ignore the assertion failures, the tests show as fails because the C runtime considers these to be fatal errors. Proposed fix: {{{ --- geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp +++ geos-3.8.0/src/index/chain/MonotoneChainBuilder.cpp @@ -111,8 +111,10 @@ } } ++last; - prev = curr; - curr = &pts[last]; + if (last < npts) { + prev = curr; + curr = &pts[last]; + } } }}} -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1002> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel