Re: bug in windows xp - Mailing list pgsql-bugs

From Tom Lane
Subject Re: bug in windows xp
Date
Msg-id 23464.1144513639@sss.pgh.pa.us
Whole thread Raw
In response to Re: bug in windows xp  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: bug in windows xp  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-bugs
Martijn van Oosterhout <kleptog@svana.org> writes:
> Re: SIGFPE on integer divide.
> This signal does appear on linux also.

Hmm, it seems to depend on the hardware you're using.  I just tried it
on four different machines:

x86 (Pentium 4): SIGFPE
x86_64 (Xeon EM64T): SIGFPE
HPPA: "ERROR:  integer out of range"  (the intended behavior)
PPC (Mac OS X): no error, returns zero

So the overflow test in int4div is definitely broken and needs to be
changed.  However, this is also a good question:

> A simple C program shows the same. Why isn't it being caught on
> windows?

That still looks like a failure to trap something we should trap.
I'd suggest fixing that first, because if we fix int4div first,
we won't have a simple test case for it.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: bug in windows xp
Next
From: Alvaro Herrera
Date:
Subject: ORDER BY bug in 8.1, WinXP