Current-Users archive

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

should divide-by-zero generate a SIGFPE?



As some of you have noticed, I've been slowly migrating some of the old src/regress tests to the new atf format. I've discovered that the test for SIGFPE in src/regress/lib/libc/siginifo/sigfpe/ doesn't work. It attempts trigger a signal by

        {
                double d = strtod("0", NULL);
                ...
                sigaction(SIGFPE, &sa, NULL);
                printf("%g\n", 1 / d);
                ...

But the routine specified in sa.sa_sigaction does not get called, and the test fails.

So, is this expected behavior? I did a quick bug search and didn't find anything relevant.

If this is expected, is there some other way to reliably generate a SIGFPE?


BTW, if it matters, I'm doing this on port-amd64.


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index