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:00:27
Message-ID: E1xHa3P-00000001pCR-2tGE@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_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/773164824353fbb023cec7f3deb11d6b5c6c06b8

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

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2026-10-16 05:01:04 pgsql: Add sentinel_ok() check to BumpCheck().
Previous Message David Rowley 2026-10-16 04:59:58 pgsql: Add sentinel_ok() check to BumpCheck().