Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
От | David Rowley |
---|---|
Тема | Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words |
Дата | |
Msg-id | CAApHDvorjk1ez2HPteCq=FRJEBR7RVogEHBO2OV9SAyO7DfHaw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [PATCH] bms_prev_member() can read beyond the end of the array of allocated words
|
Список | pgsql-hackers |
On Fri, 15 Aug 2025 at 15:24, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > David Rowley <dgrowleyml@gmail.com> writes: > > I'm happy to push Greg's v5 patch if you have no counterarguments. > > In the end this isn't something I find worth arguing about. If > you prefer v5, sure. I do suggest though that if we're installing > Asserts at all, defending against prevbit < -1 is worth doing. Agreed about defending against prevbit < -1. I added an Assert for that. Technically, that Assert could be up above the if (a == NULL) check, but I didn't think it mattered that much and opted to keep both Asserts together. The difference being that bms_prev_member(NULL, -2) will return -2 rather than Assert fail. I'm not too worried about that, but if you feel strongly differently, I can adjust what I just pushed. David
В списке pgsql-hackers по дате отправления: