[postgis-tickets] [PostGIS] #4691: Segfault when creating an index on geography(Point, 4326) column that contains empty points

PostGIS trac at osgeo.org
Wed Jul 29 08:52:31 PDT 2020


#4691: Segfault when creating an index on geography(Point, 4326) column that
contains empty points
----------------------+---------------------------
  Reporter:  aktiur   |      Owner:  Algunenano
      Type:  defect   |     Status:  new
  Priority:  blocker  |  Milestone:  PostGIS 2.5.5
 Component:  postgis  |    Version:  2.5.x
Resolution:           |   Keywords:
----------------------+---------------------------
Changes (by Algunenano):

 * owner:  pramsey => Algunenano


Comment:

 I think I have found the bug: gidx_merge seems to keep ownership of the
 new gidx pointer when the old one is unknown / empty instead of copying
 it. When this happens multiple times, the pointer might be freed several
 times in gserialized_gist_picksplit_addlist.

 This seems to fix it:
 https://github.com/Algunenano/postgis/commit/c35256b1d41852f231451cd3bf3bf72a1dbeaa1d

 I'm going to try to create a regress test for it, although it might be
 complicated since it seems like a heisenbug. I think it might affect all
 stable releases, but it was made more likely due to the changes in #4139

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4691#comment:5>
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