pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: rekgrpth@gmail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18248: Expression is always zero
Date: Thu, 14 Dec 2023 12:10:36 +0100
Message-ID: <ZXrirGsvtY3PnlfB@jrouhaud> (raw)
In-Reply-To: <18248-4250c882e2a8b8f6@postgresql.org>
References: <18248-4250c882e2a8b8f6@postgresql.org>

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





view thread (5+ messages)  latest in thread

Message-ID: <ZXrirGsvtY3PnlfB@jrouhaud>
Permalink:  ../ZXrirGsvtY3PnlfB@jrouhaud/
Also on:    postgresql.org/message-id/ZXrirGsvtY3PnlfB@jrouhaud

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: rjuju123@gmail.com, rekgrpth@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18248: Expression is always zero
  In-Reply-To: <ZXrirGsvtY3PnlfB@jrouhaud>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox