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 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq