RE: [PATCH] Fix possible underflow in expression (maxoff - 1)

Поиск
Список
Период
Сортировка
Искать
От
Ranier Vilela
Тема
RE: [PATCH] Fix possible underflow in expression (maxoff - 1)
Дата
Msg-id
MN2PR18MB29279B0857068B7DC06D1269E34B0@MN2PR18MB2927.namprd18.prod.outlook.com
Ответ на
Список
Дерево обсуждения
[PATCH] Fix possible underflow in expression (maxoff - 1) Ranier Vilela <ranier_gyn@hotmail.com>
Re: [PATCH] Fix possible underflow in expression (maxoff - 1) Peter Geoghegan <pg@bowt.ie>
RE: [PATCH] Fix possible underflow in expression (maxoff - 1) Ranier Vilela <ranier_gyn@hotmail.com>
Re: [PATCH] Fix possible underflow in expression (maxoff - 1) Thomas Munro <thomas.munro@gmail.com>
RE: [PATCH] Fix possible underflow in expression (maxoff - 1) Ranier Vilela <ranier_gyn@hotmail.com>
Re: [PATCH] Fix possible underflow in expression (maxoff - 1) Peter Geoghegan <pg@bowt.ie>
RE: [PATCH] Fix possible underflow in expression (maxoff - 1) Ranier Vilela <ranier_gyn@hotmail.com>
Re: [PATCH] Fix possible underflow in expression (maxoff - 1) Peter Geoghegan <pg@bowt.ie>
>In general, it's not possible to split a page without it being
>initialized, and having at least 2 items (not including the incoming
>newitem). Besides, even if "maxoff" had an integer underflow the
>behavior of the function would still be sane and defined. OffsetNumber
>is an unsigned type.
Well, I didn't mean that it's failing..I meant it could fail..
If PageGetMaxOffsetNumber, can return zero, maxoff can be zero.
(0 - 1), on unsigned type, certainly is underflow and if maxoff can be one,
(1 - 1) is zero, and state->newitemsz * (maxoff - 1), is zero.

>Where are you getting this stuff from? Are you using a static analysis tool?
Yes,two static tools,  but reviewed by me.

Best regards.
Ranier Vilela

--
Peter Geoghegan


В списке pgsql-hackers по дате отправления
От: Julien Rouhaud
Дата:
Сообщение: Re: Collation versioning
От: Mark Dilger
Дата:
Сообщение: Re: LISTEN/NOTIFY testing woes
FAQ