pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust Valgrind macro usage to protect chunk headers
Date: Sat, 15 Apr 2023 00:01:05 +0000
Message-ID: <E1pnTLk-0036ko-BJ@gemulon.postgresql.org> (raw)

Adjust Valgrind macro usage to protect chunk headers

Prior to this commit we only ever protected MemoryChunk's requested_size
field with Valgrind NOACCESS.  This means that if the hdrmask field is
ever accessed accidentally then we're not going to get any warnings from
Valgrind about it.  Valgrind would have warned us about the problem fixed
in 92957ed98 had we already been doing this.

Per suggestion from Tom Lane

Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/1650235.1672694719@sss.pgh.pa.us
Discussion: https://postgr.es/m/CAApHDvr=FZNGbj252Z6M9BSFKoq6BMxgkQ2yEAGUYoo7RquqZg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/414d66220adb9189951fb4d410470f9f36f9cbd1

Modified Files
--------------
src/backend/utils/mmgr/alignedalloc.c | 36 ++++++++++++----
src/backend/utils/mmgr/aset.c         | 78 ++++++++++++++++++++---------------
src/backend/utils/mmgr/generation.c   | 57 ++++++++++++-------------
src/backend/utils/mmgr/mcxt.c         | 22 +++++++++-
src/backend/utils/mmgr/slab.c         | 51 ++++++++++++++++++++---
5 files changed, 170 insertions(+), 74 deletions(-)



Message-ID: <E1pnTLk-0036ko-BJ@gemulon.postgresql.org>
Permalink:  ../E1pnTLk-0036ko-BJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pnTLk-0036ko-BJ@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Adjust Valgrind macro usage to protect chunk headers
  In-Reply-To: <E1pnTLk-0036ko-BJ@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