[postgis-devel] [PostGIS] #241: ST_LineCrossingDirection Server Crash (Segfault)

PostGIS trac at osgeo.org
Wed Aug 19 05:02:38 PDT 2009


#241: ST_LineCrossingDirection Server Crash (Segfault)
-----------------------+----------------------------------------------------
  Reporter:  batzee    |       Owner:  pramsey      
      Type:  defect    |      Status:  new          
  Priority:  critical  |   Milestone:  postgis 1.4.1
 Component:  postgis   |     Version:  1.4.X        
Resolution:            |    Keywords:  segfault     
-----------------------+----------------------------------------------------
Comment (by robe):

 Paul,

 I can make my server crash with this

 SELECT sum(ST_LineCrossingDirection(a.the_geom, b.the_geom))
 FROM ((SELECT ST_MakeLine(ST_Point(i,j),ST_Point(j,i))  As the_geom
                 FROM generate_series(-10,100,5) As i
                         CROSS JOIN generate_series(5,70, 4) As j
                         WHERE NOT(i = j)
                         ORDER BY i, i*j)) As a CROSS JOIN
         ((SELECT ST_MakeLine(ARRAY[ST_Point(i,j),ST_Point(j,i),
 ST_Point(k,i), ST_Point(j,k)])  As the_geom
                 FROM generate_series(-10,10000,1500) As i
                         CROSS JOIN generate_series(5,800, 7) As j
                         CROSS JOIN generate_series(0,800, 200) As k
                         WHERE NOT(i = j) AND NOT (j = k) AND NOT (k = i)
                         ORDER BY i, i*j)) As b
 WHERE ST_LineCrossingDirection(a.the_geom,ST_GeomFromText('LINESTRING(8
 53.54,11 53.54)')) = 1

 I could probably have come up with a simpler statement :).  It appears to
 be the use in where condition.  Without that it works fine.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/241#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list