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-11T14:53:43Z
Lists: pgsql-bugs
>>>>> "Alexander" == Alexander Korotkov <a.korotkov@postgrespro.ru> writes: >> So this logic was added in ccd6eb49a and was wrong from the start. >> Testing suggests that removing the offending pfree does indeed fix >> the issue; any objections? Alexander> No objections from me. What about moving Alexander> MemoryContextReset(so->traversalCxt) into Alexander> resetSpGistScanOpaque()? For me it seems that resetting of Alexander> traversal memory context is part of opaque reset. Looking at all those retail pfrees makes me itch... is there some reason why reconstructedValue couldn't go in the traversal context too, and then the list nodes could go there as well, and the whole thing freed with a context reset? -- Andrew (irc:RhodiumToad)
Commits
-
Repair double-free in SP-GIST rescan (bug #15378)
- 84a3a1e55c86 9.6.11 landed
- c02b56869439 10.6 landed
- e331d6712f02 11.0 landed
- 500d49794f1f 12.0 landed