pgsql: Add sentinel_ok() check to BumpCheck().

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add sentinel_ok() check to BumpCheck().
Date: 2026-10-16 05:01:04
Message-ID: E1xHa40-00000001pDL-1U8C@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add sentinel_ok() check to BumpCheck().

Effectively an oversight in 29f6a959cf. The code went to the trouble of
doing set_sentinel() but no code ever checked it was still set during
BumpCheck(). Since bump context types are used in a handful of places,
it very much makes sense to backpatch this to where bump.c was added so we
can more easily discover any memory stomping bugs.

Reported-by: shihao zhong <zhong950419(at)gmail(dot)com>
Author: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAGRkXqQxTCthDEnw_10OEGLVNMUeyE4So-K29jmn9nAkxtr1ow@mail.gmail.com
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/86848d19bdbbf0daac6ca1b92a8885179cae8db5

Modified Files
--------------
src/backend/utils/mmgr/bump.c | 4 ++++
1 file changed, 4 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-10-16 05:31:14 pgsql: Fix argument given to buffer_readv_encode_error()
Previous Message David Rowley 2026-10-16 05:00:27 pgsql: Add sentinel_ok() check to BumpCheck().