[PostGIS] #5925: TopoGeo_AddPoint crash on infinite point

PostGIS trac at osgeo.org
Fri Jun 6 17:51:39 PDT 2025


#5925: TopoGeo_AddPoint crash on infinite point
-----------------------+----------------------------
  Reporter:  robe      |      Owner:  strk
      Type:  defect    |     Status:  new
  Priority:  medium    |  Milestone:  PostGIS 3.0.12
 Component:  topology  |    Version:  3.5.x
Resolution:            |   Keywords:
-----------------------+----------------------------

Old description:

> This one is harder to replicate, cause it only seems to happen with the
> test topology that the garden tests generated
>
> {{{
> SELECT TopoGeo_AddPoint('test',
> '0101000020E6100000000000000000F07F000000000000F07F'::geometry, 20.1)
>
> }}}

New description:

 This one is harder to replicate, cause it only seems to happen with the
 test topology that the garden tests generated

 {{{
 SELECT TopoGeo_AddPoint('test',
 '0101000020E6100000000000000000F07F000000000000F07F'::geometry, 20.1)

 }}}

--
Comment (by robe):

 okay GHA is not complaining about this, so might be a windows only issue
 or maybe the ordering of the data in windows is setting up the topology
 state to crash.

 Here is the backtrace from my PG18 beta1 VC++ EDB build.


 {{{
 lwt_GetFaceContainingPoint (topo=topo at entry=0x184720562d0,
 pt=pt at entry=0x18472050258) at topo/lwgeom_topo.c:7751
 7751      double r = ( (p->x-A->x) * (B->x-A->x) + (p->y-A->y) *
 (B->y-A->y) )/( (B->x-A->x)*(B->x-A->x) +(B->y-A->y)*(B->y-A->y) );
 (gdb) \bt
 #0  lwt_GetFaceContainingPoint (topo=topo at entry=0x184720562d0,
 pt=pt at entry=0x18472050258) at topo/lwgeom_topo.c:7751
 #1  0x00007ffda6a7289c in _lwt_AddIsoNode (topo=topo at entry=0x184720562d0,
 face=face at entry=-1, pt=pt at entry=0x18472050258,
 skipISOChecks=skipISOChecks at entry=0, checkFace=checkFace at entry=1) at
 topo/lwgeom_topo.c:554
 #2  0x00007ffda6a733b5 in _lwt_AddPoint (topo=<optimized out>,
 topo at entry=0x184720562d0, point=point at entry=0x18472050258,
 tol=tol at entry=20.100000000000001, findFace=findFace at entry=1,
 moved=moved at entry=0x0) at topo/lwgeom_topo.c:6853
 #3  0x00007ffda6a75538 in lwt_AddPoint (topo=topo at entry=0x184720562d0,
 point=point at entry=0x18472050258, tol=tol at entry=20.100000000000001) at
 topo/lwgeom_topo.c:6870
 #4  0x00007ffda6a28eab in TopoGeo_AddPoint (fcinfo=0x18472042970) at
 postgis_topology.c:5040
 #5  0x00007ff694c0e94d in postgres!ExecEvalXmlExpr ()
 #6  0x00007ff694c53891 in postgres!ExecReScanResult ()
 #7  0x00007ff694c19b8d in standard_ExecutorRun ()
 #8  0x00007ff694e0be4b in postgres!PortalRunFetch ()
 #9  0x00007ff694e0b81f in postgres!PortalRun ()
 #10 0x00007ff694e091dd in postgres!die ()
 #11 0x00007ff694e05197 in postgres!PostgresMain ()
 #12 0x00007ff694e02533 in postgres!BackendMain ()
 #13 0x00007ff694d4b2f1 in postgres!SubPostmasterMain ()
 #14 0x00007ff694c83818 in postgres!main ()

 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5925#comment:1>
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