git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ad7b48e) | patch
Fix dangling smgr_owner pointer when a fake relcache entry is freed.
Fri, 7 Mar 2014 11:25:11 +0000 (13:25 +0200)
Fri, 7 Mar 2014 11:28:52 +0000 (13:28 +0200)
commit 55566c9a740144439b54ff3aacbd43d11b6de52f
Fix dangling smgr_owner pointer when a fake relcache entry is freed.

A fake relcache entry can "own" a SmgrRelation object, like a regular
relcache entry. But when it was free'd, the owner field in SmgrRelation
was not cleared, so it was left pointing to free'd memory.

Amazingly this apparently hasn't caused crashes in practice, or we would've
heard about it earlier. Andres found this with Valgrind.

Report and fix by Andres Freund, with minor modifications by me. Backpatch
to all supported versions.
src/backend/access/transam/xlogutils.c diff | blob | blame | history
src/backend/storage/smgr/smgr.c diff | blob | blame | history
src/include/storage/smgr.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /