Port-vax archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Libm core dump with SIGILL
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
simh$ ./a.out
[4] Illegal instruction (core dumped) ./a.out
On a modern architecture with IEEE floats:
$ gcc -Wall exp.c -lm
$ ./a.out
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?
The test program is this (also attached)
#include <math.h>
#include <stdio.h>
int main(int argc, char *argv[], char *envp[]) {
double arg = 88.029691931113055;
double ret = exp(arg);
printf("exp(%g) = %g\n", arg, ret);
return(0);
}
--
greg
#include <math.h>
#include <stdio.h>
int main(int argc, char *argv[], char *envp[]) {
double arg = 88.029691931113055;
double ret = exp(arg);
printf("exp(%g) = %g\n", arg, ret);
return(0);
}
Home |
Main Index |
Thread Index |
Old Index