[GEOS] #1002: assertion failures with VS2017 / VS2019

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[GEOS] #1002: assertion failures with VS2017 / VS2019

geos-2
#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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #1002: assertion failures with VS2017 / VS2019

geos-2
#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  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by dbaston):

 PR at https://github.com/libgeos/geos/pull/244

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/1002#comment:1>
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #1002: assertion failures with VS2017 / VS2019

geos-2
In reply to this post by geos-2
#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  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by strk):

 Merge instructions, for local testing:

   git checkout -b dbaston-trac-1002 master
   git pull https://github.com/dbaston/libgeos.git trac-1002

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/1002#comment:2>
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #1002: assertion failures with VS2017 / VS2019

geos-2
In reply to this post by geos-2
#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  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by strk):

 Daniel any chance to see a test added for this case ?

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/1002#comment:3>
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #1002: assertion failures with VS2017 / VS2019

geos-2
In reply to this post by geos-2
#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  |  Resolution:
 Keywords:              |
------------------------+---------------------------

Comment (by dbaston):

 Not without adding these MSVC configurations to our CI. The code in
 question is already hit by our test suites; the bug is just optimized out.

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/1002#comment:4>
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #1002: assertion failures with VS2017 / VS2019

geos-2
In reply to this post by geos-2
#1002: assertion failures with VS2017 / VS2019
------------------------+---------------------------
 Reporter:  dbaston     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.8.1
Component:  Default     |     Version:  3.8.0
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------
Changes (by Daniel Baston <dbaston@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"3fc652822ef3a825784919423d636c9584dbd2ba/git" 3fc6528/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="3fc652822ef3a825784919423d636c9584dbd2ba"
 Avoid access past end of vector

 In most configurations this access would be optimized out (as it is
 never used) but this is not always the case.

 Fixes #1002
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/1002#comment:5>
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel
Reply | Threaded
Open this post in threaded view
|

Re: [GEOS] #1002: assertion failures with VS2017 / VS2019

geos-2
In reply to this post by geos-2
#1002: assertion failures with VS2017 / VS2019
------------------------+---------------------------
 Reporter:  dbaston     |       Owner:  geos-devel@…
     Type:  defect      |      Status:  closed
 Priority:  major       |   Milestone:  3.8.1
Component:  Default     |     Version:  3.8.0
 Severity:  Unassigned  |  Resolution:  fixed
 Keywords:              |
------------------------+---------------------------

Comment (by Dan Baston <dbaston@…>):

 In [changeset:"93be2e1d5a143d757e6cf5fc7c29c7ef48919ccf/git" 93be2e1/git]:
 {{{
 #!CommitTicketReference repository="git"
 revision="93be2e1d5a143d757e6cf5fc7c29c7ef48919ccf"
 Avoid access past end of vector

 In most configurations this access would be optimized out (as it is
 never used) but this is not always the case.

 Fixes #1002
 }}}

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/1002#comment:6>
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geos-devel