[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 14:35:
While running the Postgres regression tests I found that the exp()
function in libm gets a SIGILL with certain arguments.
simh$ gcc -Wall exp.c -lm
 Illegal instruction (core dumped) ./a.out
On a modern architecture with IEEE floats:
$ gcc -Wall exp.c -lm
exp(88.0297) = 1.70141e+38
I know the VAX floating points are not exactly IEEE and they may not
be able to represent this value but I would expect them to get a FPE
or signal overflow in some other way, not get a SIGILL?
Well, not in VAX FP. From the man page for exp:
These functions will return the appropriate computation unless an
occurs or an argument is out of range. The functions exp() and
detect if the computed value will overflow, set the global
to ERANGE and cause a reserved operand fault on a VAX.
So, it is following the specs... :-)
Main Index |
Thread Index |