Re: BUG #18248: Expression is always zero

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: rekgrpth(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18248: Expression is always zero
Date: 2023-12-14 14:40:48
Message-ID: 2780888.1702564848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> 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

> 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

Yeah, the tzcode crew have a wider range of (possibly theoretical)
target systems in mind than we do. They probably won't think this
is a bug, and we're unlikely to diverge from whatever they do.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-12-14 14:43:45 Re: BUG #18247: Integer overflow leads to negative width
Previous Message Julien Rouhaud 2023-12-14 14:38:39 Re: BUG #18245: pg_restore accepts same output file name as input file name