From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Mark buffers as defined to Valgrind consistently.
Date: Sun, 19 Jul 2020 16:47:43 +0000
Message-ID: <E1jxCTX-0006hb-Uy@gemulon.postgresql.org> (raw)
Mark buffers as defined to Valgrind consistently.
Make PinBuffer() mark buffers as defined to Valgrind unconditionally,
including when the buffer header spinlock must be acquired. Failure to
handle that case could lead to false positive reports from Valgrind.
This theoretically creates a risk that we'll mark buffers defined even
when external callers don't end up with a buffer pin. That seems
perfectly acceptable, though, since in general we make no guarantees
about buffers that are unsafe to access being reliably marked as unsafe.
Oversight in commit 1e0dfd16, which added valgrind buffer access
instrumentation.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/46ef520b9566d9eccb095ceafa53e5c305cf80b9
Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pg@bowt.ie
Subject: Re: pgsql: Mark buffers as defined to Valgrind consistently.
In-Reply-To: <E1jxCTX-0006hb-Uy@gemulon.postgresql.org>
References: <E1jxCTX-0006hb-Uy@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox