Re: [PATCH] Add error handling to byteaout.

Поиск
Список
Период
Сортировка
От Andreas Seltenreich
Тема Re: [PATCH] Add error handling to byteaout.
Дата
Msg-id 87lhg2dpl1.fsf@oort.credativ.de
обсуждение исходный текст
Ответ на Re: [PATCH] Add error handling to byteaout.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Add error handling to byteaout.
Re: [PATCH] Add error handling to byteaout.
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Andreas Seltenreich <andreas.seltenreich@credativ.de> writes:
>> The scary one is due to an integer overflow the attached patch also
>> fixes.
>
> s/int/Size/ doesn't fix anything on 32-bit machines.

Well, it changes the signedness of the computation on 32-bit, and in
combination with the fact that "len" is always smaller than 2^32, but
may exceed 2^31-1, the change avoids the dependency on the undefined
behavior of signed integer overflows in C on 32-bit as well.  But I
admit that this might be a rather academic point...

Anyway, my motivation for the patch was the improved error reporting.
Is the drive-by type change a problem here?

regards,
Andreas



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: WIP: Enhanced ALTER OPERATOR
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Missing "-i / --ignore-version" in pg_dump help