public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniel Gustafsson <[email protected]>
To: [email protected]
Subject: pgsql: Fix integer underflow in shared memory debugging
Date: Thu, 29 Feb 2024 11:45:25 +0000
Message-ID: <[email protected]> (raw)

Fix integer underflow in shared memory debugging

dsa_dump would print a large negative number instead of zero for
segment bin 0.  Fix by explicitly checking for underflow and add
special case for bin 0. Backpatch to all supported versions.

Author: Ian Ilyasov <[email protected]>
Reviewed-by: Robert Haas <[email protected]>
Discussion: https://postgr.es/m/GV1P251MB1004E0D09D117D3CECF9256ECD502@GV1P251MB1004.EURP251.PROD.OUTLOOK.COM
Backpatch-through: v12

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/24dc4afebd5a82f30aed6bd18d48ff42ef787410

Modified Files
--------------
src/backend/utils/mmgr/dsa.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)



view thread (6+ messages)

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Fix integer underflow in shared memory debugging
  In-Reply-To: <[email protected]>

* 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