[postgis-devel] [PostGIS] #1999: Crash on LINESTRING with one point

PostGIS trac at osgeo.org
Fri Sep 14 06:02:56 PDT 2012


#1999: Crash on LINESTRING with one point
---------------------------+------------------------------------------------
 Reporter:  realityexists  |       Owner:  pramsey      
     Type:  defect         |      Status:  new          
 Priority:  medium         |   Milestone:  PostGIS 2.1.0
Component:  postgis        |     Version:  trunk        
 Keywords:                 |  
---------------------------+------------------------------------------------
 Run the following a couple of times and PostgreSQL crashes:
 {{{
 CREATE OR REPLACE FUNCTION _dummy_func(lines geometry(LineString)[])
 RETURNS geometry(LineString) AS
 'BEGIN RETURN lines[1]; END'
 LANGUAGE plpgsql IMMUTABLE;

 SELECT ST_AsText(_dummy_func(ARRAY['LINESTRING(5 5)'])),
 ST_AsText(_dummy_func(ARRAY['LINESTRING(5 5)']));
 }}}

 The first time it returns "ERROR: geometry requires more points" as
 expected. The second time it crashes.

 Windows 7 x64, PostgreSQL 9.1.4 x64

 POSTGIS="2.1.0SVN r10237" GEOS="3.4.0dev-CAPI-1.8.0 r0" PROJ="Rel. 4.8.0,
 6 March 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8"
 LIBJSON="UNKNOWN" RASTER

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1999>
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-devel mailing list