[postgis-tickets] [PostGIS] #4709: Backend crash with TopoGeo_addLinestring against an invalid topology (2)

PostGIS trac at osgeo.org
Fri Jun 26 03:17:05 PDT 2020


#4709: Backend crash with TopoGeo_addLinestring against an invalid topology (2)
----------------------+--------------------
 Reporter:  strk      |      Owner:  strk
     Type:  defect    |     Status:  new
 Priority:  blocker   |  Milestone:
Component:  topology  |    Version:  master
 Keywords:            |
----------------------+--------------------
 In some circumstance, the TopoGeo_addLinestring function ends up finding N
 edges forming a ring from one of the edges resulting from the input
 linestring (this operation is performed by following edge linking
 information) and later fails to find all the corresponding edge_data
 records in the topology primitive table.

 {{{
 NOTICE:  failed after trying with tolerance 6.75 : XX000 message:
 Unexpected error: 6461 edges found when expecting 6462 detail :  hint   :
 context: SQ
 L statement "SELECT ARRAY(SELECT
 topology.TopoGeo_addLinestring('test_topo_t4','0102000020E9640000040000003B28C645D88B1A41366677CC3F675B413B28C645B08B1A
 4123A36AD93E675B413B28C645608B1A41FD1C51F33C675B413B28C645388B1A41EA5944003C675B41',6.75))"
 }}}

 When such occurrence happens, the cleanup code in _lwt_MakeRingShell
 attempts to release the expected number of edges, rather than the obtained
 number of edges, resulting in potential access to unallocated memory
 (segfault)

 This is a followup of #4706 and the fix needs be backported to all
 relevant branches.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4709>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list