agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Undo thinko in commit e78d1d6d4.
Date: Wed, 10 Jun 2026 21:01:50 +0000
Message-ID: <E1wXQ3a-001utu-1A@gemulon.postgresql.org> (raw)

Undo thinko in commit e78d1d6d4.

In pursuit of removing a Valgrind-detected leak, I inserted
"pfree(pq_mq_handle);" into mq_putmessage's recursion-trouble-recovery
code path, failing to notice that shm_mq_detach would have pfree'd
that block just before (i.e., this particular code path did not leak).
So now that was a double pfree.  We didn't notice because the
recursion scenario isn't exercised in our regression tests, but
Alexander Lakhin found it via code fuzzing.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/b8b40954-e155-41b3-9af8-ad4f261a1b64@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d141466ff087230571e9c9dfd720deb94977253

Modified Files
--------------
src/backend/libpq/pqmq.c | 1 -
1 file changed, 1 deletion(-)



Message-ID: <E1wXQ3a-001utu-1A@gemulon.postgresql.org>
Permalink:  ../E1wXQ3a-001utu-1A@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wXQ3a-001utu-1A@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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Undo thinko in commit e78d1d6d4.
  In-Reply-To: <E1wXQ3a-001utu-1A@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox