Re: BUG #5592: list of integer undefined behaviors

From: Greg Stark <gsstark(at)mit(dot)edu>
To: John Regehr <regehr(at)cs(dot)utah(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5592: list of integer undefined behaviors
Date: 2010-08-03 00:39:09
Message-ID: AANLkTi=_3BNR==jwRgP=petrdGfeSA_+s8_CtdSK=TcD@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Aug 2, 2010 at 7:16 PM, John Regehr <regehr(at)cs(dot)utah(dot)edu> wrote:
> <nabstime.c, (1193:21)> : Op: -, Reason : Signed Subtraction Overflow,
> BINARY OPERATION: left (int32): 2147483644 right (int32): -2147483648
>
> <nabstime.c, (1194:21)> : Op: -, Reason : Signed Subtraction Overflow,
> BINARY OPERATION: left (int32): 2147483644 right (int32): -2147483648
>

These seem to imply that tinterval can contain a start point greater
than its end point. I'm not familiar with the rep invariant of
tinterval well enough to know if that's true or an indication of a bug
elsewhere. I suppose it doesn't matter for cmp since it's still
assigning an arbitrary position in the range to the interval.

--
greg

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-08-03 01:31:49 Re: BUG #5590: undefined shift behavior
Previous Message John Regehr 2010-08-02 18:16:59 BUG #5592: list of integer undefined behaviors