[postgis-tickets] [PostGIS] #4174: segfault when using spgist
PostGIS
trac at osgeo.org
Wed Sep 12 13:15:21 PDT 2018
#4174: segfault when using spgist
----------------------+--------------------------------
Reporter: TobWen | Owner: pramsey
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS PostgreSQL
Component: postgis | Version: trunk
Resolution: fixed | Keywords:
----------------------+--------------------------------
Changes (by robe):
* status: new => closed
* resolution: => fixed
* milestone: PostGIS 2.5.0 => PostGIS PostgreSQL
Comment:
Fixed upstream
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=e331d6712f0224160d2699591704ddcc3ef2d67b
{{{
Summary
Repair double-free in SP-GIST rescan (bug #15378) (details)
Commit e331d6712f0224160d2699591704ddcc3ef2d67b by rhodiumtoad
Repair double-free in SP-GIST rescan (bug #15378)
spgrescan would first reset traversalCxt, and then traverse a
potentially non-empty stack containing pointers to traversalValues which
had been allocated in those contexts, freeing them a second time. This
bug originates in commit ccd6eb49a where traversalValue was introduced.
Repair by traversing the stack before the context reset; this isn't
ideal, since it means doing retail pfree in a context that's about to be
reset, but the freeing of a stack entry is also done in other places in
the code during the scan so it's not worth trying to refactor it
further. Regression test added.
Backpatch to 9.6 where the problem was introduced.
Per bug #15378; analysis and patch by me, originally from a report on
IRC by user velix; see also PostGIS ticket #4174; review by Alexander
Korotkov.
Discussion:
https://postgr.es/m/153663176628.23136.11901365223750051490@wrigleys.postgresql.org
The file was modified src/test/regress/expected/spgist.out
The file was modified src/test/regress/sql/spgist.sql
The file was modified src/backend/access/spgist/spgscan.c
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4174#comment:2>
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