Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
Date
Msg-id 131108.1755180400@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> There's a comment saying:
>  * "prevbit" must NOT be more than one above the highest possible bit that can
>  * be set at the Bitmapset at its current size.
> 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?

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

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options
Next
From: David Rowley
Date:
Subject: Re: Compilation issues for HASH_STATISTICS and HASH_DEBUG options