Re: Protecting allocator headers with Valgrind

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-04-12T01:59:22Z
Lists: pgsql-hackers
On Tue, Apr 11, 2023 at 9:28 PM David Rowley <dgrowleyml@gmail.com> wrote:

> Over on [1], Tom mentioned that we might want to rethink the decision
> to not protect chunk headers with Valgrind.  That thread fixed a bug
> that was accessing array element -1, which effectively was reading the
> MemoryChunk at the start of the allocated chunk as an array element.


Seems the link to the original thread is not pasted.  Here it is.

[1] https://www.postgresql.org/message-id/1650235.1672694719%40sss.pgh.pa.us

Thanks
Richard

Commits

  1. Adjust Valgrind macro usage to protect chunk headers