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 обсуждение исходный текст |
Ответ на | Re: [PATCH] Fix possible underflow in expression (maxoff - 1) (Peter Geoghegan <pg@bowt.ie>) |
Ответы |
Re: [PATCH] Fix possible underflow in expression (maxoff - 1)
Re: [PATCH] Fix possible underflow in expression (maxoff - 1) |
Список | pgsql-hackers |
>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 по дате отправления: