[postgis-tickets] [PostGIS] #2185: Second WKT parse crashes server

PostGIS trac at osgeo.org
Wed Jan 23 14:46:04 PST 2013


#2185: Second WKT parse crashes server
---------------------+------------------------------------------------------
 Reporter:  mwtoews  |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.3
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------
 This is an oddity that can be demonstrated two ways on my work PC:

 Read valid WKT followed by invalid WKT:
 {{{
 postgis=# SELECT ST_AsText('POINT(3 4)');
  st_astext
 ------------
  POINT(3 4)
 (1 row)


 postgis=# SELECT ST_AsText('POINT(3 4 hi)');
 server closed the connection unexpectedly
         This probably means the server terminated abnormally
         before or while processing the request.
 The connection to the server was lost. Attempting reset: Failed.
 }}}

 Or read invalid WKT twice:
 {{{
 postgis=# SELECT ST_AsText('POINT Z(3 4 hi)');
 ERROR:  parse error - invalid geometry
 HINT:  "POINT Z(3 4 hi" <-- parse error at position 14 within geometry
 CONTEXT:  SQL function "st_astext" statement 1
 postgis=# SELECT ST_AsText('POINT Z(3 4 hi)');
 server closed the connection unexpectedly
         This probably means the server terminated abnormally
         before or while processing the request.
 The connection to the server was lost. Attempting reset: Failed.
 }}}

 Note that only the second example shows a helpful error message.

 POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" 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/2185>
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