Re: Solaris 8 regression test failure with 8.0.0beta5 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Solaris 8 regression test failure with 8.0.0beta5
Date
Msg-id 25423.1101365135@sss.pgh.pa.us
Whole thread Raw
In response to Solaris 8 regression test failure with 8.0.0beta5  (Kenneth Marshall <ktm@it.is.rice.edu>)
Responses Re: Solaris 8 regression test failure with 8.0.0beta5
List pgsql-hackers
Kenneth Marshall <ktm@is.rice.edu> writes:
> Here are the diffs for the regression test failures on Solaris 8.
> The tests work fine on Redhat9 and Redhat Enterprise Linux 3.

... and most other platforms ...

>   select 1/0;
> ! ERROR:  floating-point exception
> ! DETAIL:  An invalid floating-point operation was signaled. This probably means an out-of-range result or an invalid
operation,such as division by zero.
 

This query would invoke the following code in int4div:
   if (arg2 == 0)       ereport(ERROR,               (errcode(ERRCODE_DIVISION_BY_ZERO),
errmsg("divisionby 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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: ElayaRaja S
Date:
Subject: Help!
Next
From: Simon Riggs
Date:
Subject: Re: lwlocks and starvation