Re: [GENERAL] division by zero

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] division by zero
Date: 2003-03-08 18:31:00
Message-ID: 303E00EBDD07B943924382E153890E5433F7ED@cuthbert.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-08 19:20:52 Re: My contract has been renewed
Previous Message Tom Lane 2003-03-08 18:19:03 Re: division by zero