Re: Floating-point exception handling
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com David N. Williams wrote:
[...]
Even so, I still have a problem. When the example is run on OS X intel, the only signal code supplied to the handler in the si_code field of the siginfo_t structure, when it's invoked on SIGFPE, is FPE_NOOP. OS X ppc and GNU/Linux both supply at least FPE_FLTDIV and FPE_FLTINV -- other codes not tested yet. [...]
So am I doing something wrong? Nobody seems to have an idea about this? :-( After experimenting with more cases, AFAICT I'm not doing anything wrong -- the discrepancy is real. So let me advocate that the discrepancy be resolved to make the intel behavior for sigaction() the same as that for ppc and GNU/Linux. Is it onerous to implement putting the FPE_xxx code for the floating-point exception which invokes SIGFPE into the si_code member of the siginfo_t received by the handler? Without that or equivalent information, alternate IEEE 754 signal handling seems crippled. Doing so seems to be the Single UNIX 3 spec. IANAL, so it's hard for me to judge whether the [XSI|RTS] label next to the spec for si_code quoted below means that it's technically optional.
You aren't running Snow Leopard, where this is fixed, are you? -- Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Sep 28, 2009, at 3:13 PM, David N. Williams wrote: Am I off base here? This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert