Re: Why our Valgrind reports suck

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>, Álvaro Herrera <alvherre@kurilemu.de>, pgsql-hackers@lists.postgresql.org
Date: 2025-05-23T17:39:15Z
Lists: pgsql-hackers
Peter Geoghegan <pg@bowt.ie> writes:
> On Fri, May 23, 2025 at 11:42 AM Andres Freund <andres@anarazel.de> wrote:
>>> I'm envisioning this patch series as v19 work, were you
>>> thinking we should be more aggressive?

>> Mostly agreed - but I am wondering if the AV fix should be backpatched?

> I think that it probably should be.

Yeah, I agree, but didn't get to that yet.  I've also gone ahead with
committing a couple of clear bugs that I located while doing this.

			regards, tom lane



Commits

  1. Undo thinko in commit e78d1d6d4.

  2. Avoid leakage of zero-length arrays in partition_bounds_copy().

  3. Fix MemoryContextAllocAligned's interaction with Valgrind.

  4. Fix assorted pretty-trivial memory leaks in the backend.

  5. Improve our support for Valgrind's leak tracking.

  6. Reduce leakage during PL/pgSQL function compilation.

  7. Silence Valgrind leakage complaints in more-or-less-hackish ways.

  8. Silence complaints about leaks in PlanCacheComputeResultDesc.

  9. Suppress complaints about leaks in TS dictionary loading.

  10. Suppress complaints about leaks in function cache loading.

  11. Fix per-relation memory leakage in autovacuum.

  12. Fix AlignedAllocRealloc to cope sanely with OOM.