Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Burd <greg(at)burd(dot)me>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
Date: 2025-08-14 14:16:49
Message-ID: CAApHDvq5OpX66FB=aBsKXSboDGruVMa=z2KST5LecEqeo2E=ew@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 15 Aug 2025 at 02:06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > So looks like it's the fault of the calling code and not an issue with
> > bms_prev_member().
>
> Yeah. But perhaps it'd be reasonable to put in an Assert checking
> that?

Seems like a good idea.

> Grammar nitpick: comment should be more like "set in the Bitmapset".

Agreed.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2025-08-14 14:19:55 Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
Previous Message Tom Lane 2025-08-14 14:14:17 Re: cfbot mistakenly reports that a rebase is needed