pgsql: Suppress spurious Coverity warning in prune freeze logic

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Suppress spurious Coverity warning in prune freeze logic
Date: 2025-12-04 23:56:29
Message-ID: E1vRJBU-002qc3-1p@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Suppress spurious Coverity warning in prune freeze logic

Adjust the prune_freeze_setup() parameter types of new_relfrozen_xid and
new_relmin_mxid to prevent misleading Coverity analysis.
heap_page_prune_and_freeze() compared these values against NULL when
passing them to prune_freeze_setup(), causing Coverity to assume they
could be NULL and flag a possible null-pointer dereference later, even
though it occurs inside a directly related conditional.

Reported-by: Coverity
Author: Melanie Plageman <melanieplageman(at)gmail(dot)com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/904f9f5ea0e00a88e2429682d01f2ec946bf553a

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-12-05 00:23:15 pgsql: Show version of nodes in output of TAP tests
Previous Message Nathan Bossart 2025-12-04 21:42:30 pgsql: Fix key size of PrivateRefCountHash.