Re: Solaris 8 regression test failure with 8.0.0beta5

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Solaris 8 regression test failure with 8.0.0beta5
Date: 2004-11-25 17:05:39
Message-ID: 874qjd2718.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> This query would invoke the following code in int4div:
>
> if (arg2 == 0)
> ereport(ERROR,
> (errcode(ERRCODE_DIVISION_BY_ZERO),
> errmsg("division by zero")));
>
> result = arg1 / arg2;
>
> I suggest directing some strong words to your compiler vendor. If the
> "if" test doesn't complete before the subsequent division causes a trap,
> that is not our problem.

I have a vague memory that IEEE floats have zero coming in two flavours, 0 and
-0. I wonder if it's possible merely comparing against 0 isn't covering all
the possible cases that can trigger a division by zero trap.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-25 17:46:58 Re: Explain output: wrong row count?
Previous Message Tom Lane 2004-11-25 16:49:55 Re: Intermittent bug