diff options
author | David Rowley <drowley@postgresql.org> | 2025-08-15 16:33:07 +1200 |
---|---|---|
committer | David Rowley <drowley@postgresql.org> | 2025-08-15 16:33:07 +1200 |
commit | b4632883d44eae892e28dafbf674e6ac3dfd824d (patch) | |
tree | 26031f17dac787b6c0af71205591a38edcb00c2a /src/backend/executor/execReplication.c | |
parent | 69f75d6714753e594fb383d2e53a8003a8b54dfd (diff) |
Add Asserts to validate prevbit values in bms_prev_member
bms_prev_member() could attempt to access memory outside of the words[]
array in cases where the prevbit was a number < -1 or > a->nwords *
BITS_PER_BITMAPWORD + 1.
Here we add the Asserts to help draw attention to bogus callers so we're
more likely to catch them during development.
In passing, fix wording of bms_prev_member's header comment which talks
about how we expect the callers to ensure only valid prevbit values are
used.
Author: Greg Burd <greg@burd.me>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/2000A717-1FFE-4031-827B-9330FB2E9065%40getmailspring.com
Diffstat (limited to 'src/backend/executor/execReplication.c')
0 files changed, 0 insertions, 0 deletions