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

PostGIS trac at osgeo.org
Thu Aug 20 01:30:51 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 nicklas):

 I took a quick look at Reginas example. The crash only appears when there
 is more than one row.
 If I make a table like

 {{{
 create table c as
 SELECT ST_MakeLine(ST_Point(-10,40),ST_Point(40,-10)) As the_geom ;
 insert into c
 SELECT ST_MakeLine(ST_Point(0,40),ST_Point(40,0)) As the_geom ;
 }}}

 then this crashes:

 {{{
 SELECT sum(ST_LineCrossingDirection(the_geom,
 ST_GeomFromText('LINESTRING(1 2,3 4)'))) FROM  c
 }}}

 it also crashes if I run:

 {{{
 SELECT sum(ST_LineCrossingDirection(the_geom,
 ST_GeomFromText('LINESTRING(1 2,3 4)'))) FROM  c limit 1;
 }}}

 But it will not crash if I run:

 {{{
 SELECT sum(ST_LineCrossingDirection(the_geom,
 ST_GeomFromText('LINESTRING(1 2,3 4)'))) FROM  (select * from c limit 1) d
 }}}

 I don't know enough to understand the internal difference between the two
 last examples. As I understand it it doesn't wich one of the two rows I
 put first in the last example so it isn't the lines in itself that crashes
 the function, but something hangeing there from the last run of the
 function.

 /Nicklas

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


More information about the postgis-devel mailing list