Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Libm core dump with SIGILL

Greg Stark skrev den 2015-08-21 17:27:
On Fri, Aug 21, 2015 at 4:22 PM, Mouse <mouse%rodents-montreal.org@localhost> wrote:
As for the original issue, it looks to me as though it is either pilot
error (if the package is documented as requiring IEEE floats), a bug in
the documentation (if it's supposed to require IEEE floats but isn't
documented that way), or a bug in the tests (if it's not supposed to
require IEEE floats).

Postgres doesn't in theory require IEEE floats, though I think every
other platform has them at this point so users might be surprised.

It just seems like we assumed any failures would manifest with an FPE,
not some other signal.

Have you tried to add your own infnan(), for example what given in the man page?

#include           <math.h>
#include           <errno.h>
extern int         errno ;
double  infnan(iarg)
        int        iarg ;
        switch(iarg)    {
        case        ERANGE:        errno = ERANGE; return(HUGE);
        case       -ERANGE:        errno = EDOM;   return(-HUGE);
        default:                   errno = EDOM;   return(0);

Or instead of returning values, do "kill(0, SIGFPE);"


-- Ragge

Home | Main Index | Thread Index | Old Index