Re: BUG #18248: Expression is always zero

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: BUG #18248: Expression is always zero
Дата
Msg-id ZXrirGsvtY3PnlfB@jrouhaud
обсуждение исходный текст
Ответ на BUG #18248: Expression is always zero  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18248: Expression is always zero
Список pgsql-bugs
Hi,

On Thu, Dec 14, 2023 at 05:32:49AM +0000, PG Bug reporting form wrote:
>
> The value of expression 'thistimecnt >> 31 >> 31 >> 2' (in
> src/timezone/zic.c) is zero regardless of the value of the left operand
> 'thistimecnt', because it is shifted by 64 (in total) bits, which is greater
> or equal to its size of 64 bits.
>
> Maybe this was what was meant?
> thistimecnt >> 31 >> 2

Note that this is code imported as-is from upstream IANA tzcode, so we wouldn't
make any change ourself.

Looking at their git history they added it to remove some theoretical int
limits:
https://github.com/eggert/tz/commit/cc8aec6ecb1ecc3099f173e2bca9785ae8359c03



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: BUG #18248: Expression is always zero
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #18248: Expression is always zero