Re: BUG #5592: list of integer undefined behaviors
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #5592: list of integer undefined behaviors |
| Дата | |
| Msg-id | 6265.1280801341@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BUG #5592: list of integer undefined behaviors (Greg Stark <gsstark@mit.edu>) |
| Ответы |
Re: BUG #5592: list of integer undefined behaviors
|
| Список | pgsql-bugs |
Greg Stark <gsstark@mit.edu> writes:
> 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.
Just to follow up: all the other ones seem to be non-problems.
The one in bitmapset.c is an intentional trick (see the comment for
the RIGHTMOST_ONE macro), and all the ones in int.c and int8.c have
associated overflow checks. I'm actually a bit surprised that the
regression tests seem to exercise all of those overflow checks ;-)
Like Greg, I'm not sure about the tinterval_cmp_internal cases.
tinterval is pretty much a dead legacy datatype anyway, but probably we
oughta fix it if there are failures showing up in the regression tests.
regards, tom lane
В списке pgsql-bugs по дате отправления: