Re: [GENERAL] division by zero - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: [GENERAL] division by zero
Date
Msg-id 303E00EBDD07B943924382E153890E5433F7ED@cuthbert.rcsinc.local
Whole thread Raw
Responses Re: [GENERAL] division by zero  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Tom Lane wrote:
>
> I checked into this, and indeed OS X 10.2 is behaving funny: integer
> divide by zero doesn't raise any signal, it just returns a bogus
answer.
> They're within their rights to do so according to the ANSI C spec
> (wherein division by zero is stated to have undefined behavior).
> But since other BSD-derived Unixen all seem to raise SIGFPE, I can't
> help wondering if this shouldn't be considered a bug.

FWIW, this also is a problem with some of the windows ports.  For
example, 'select 0/0' is unpredictable and can cause the server to gpf
and restart.  This does not include the SRA port, because I don't have
it.

Merlin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] division by zero
Next
From: Stephan Szabo
Date:
Subject: Re: [GENERAL] division by zero