Re: BUG #5592: list of integer undefined behaviors - Mailing list pgsql-bugs

From Greg Stark
Subject Re: BUG #5592: list of integer undefined behaviors
Date
Msg-id AANLkTi=_3BNR==jwRgP=petrdGfeSA_+s8_CtdSK=TcD@mail.gmail.com
Whole thread Raw
In response to BUG #5592: list of integer undefined behaviors  ("John Regehr" <regehr@cs.utah.edu>)
Responses Re: BUG #5592: list of integer undefined behaviors
Re: BUG #5592: list of integer undefined behaviors
List pgsql-bugs
On Mon, Aug 2, 2010 at 7:16 PM, John Regehr <regehr@cs.utah.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

pgsql-bugs by date:

Previous
From: "John Regehr"
Date:
Subject: BUG #5592: list of integer undefined behaviors
Next
From: Tom Lane
Date:
Subject: Re: BUG #5590: undefined shift behavior