Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group