[postgis-tickets] [PostGIS] #3404: ST_ClusterWithin crashes backend

PostGIS trac at osgeo.org
Sun Dec 20 12:52:04 PST 2015


#3404: ST_ClusterWithin crashes backend
---------------------+---------------------------
 Reporter:  dbaston  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  blocker  |  Milestone:  PostGIS 2.2.1
Component:  postgis  |    Version:  2.2.x
 Keywords:           |
---------------------+---------------------------
 The UF_ordered_by_cluster function assumes that {{{UF_find}}} will fully
 compress all paths, ie after a call to {{{UF_find(uf, i)}}}, we can say
 that {{{uf->clusters[i] = UF_find(uf, i)}}}.

 It's possible to end up with a situation where this does not hold;  I've
 run across one in an input set of 24,000 points.  The consequence of this
 is that the `combine_geometries` routine will produce more geometries than
 expected, and will overflow a block of  allocated memory.

 I'll commit a fix to (a) make sure that `UF_find` fully compresses paths,
 resolving the root cause of the problem, and (b) include a guard in
 `combine_geometries` so that we can return an error instead of
 overflowing.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3404>
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