Re: BUG #15378: SP-GIST memory context screwup?

Andrew Gierth <andrew@tao11.riddles.org.uk>

From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: pgsql-bugs@lists.postgresql.org, Teodor Sigaev <teodor@sigaev.ru>
Date: 2018-09-11T16:31:24Z
Lists: pgsql-bugs

Attachments

>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:

 Andrew> So the simplest fix would be to move the memory context reset
 Andrew> to just after the freeScanStack in resetSpGistScanOpaque. And
 Andrew> with retail freeing going on during the scan, it makes less
 Andrew> sense to try and avoid it during rescan, double ugh.

Proposed patch attached.

-- 
Andrew (irc:RhodiumToad)

Commits

  1. Repair double-free in SP-GIST rescan (bug #15378)