Re: Floating-point exception handling
Re: Floating-point exception handling
- Subject: Re: Floating-point exception handling
- From: Terry Lambert <email@hidden>
- Date: Mon, 28 Sep 2009 17:11:26 -0700
On Sep 28, 2009, at 3:13 PM, David N. Williams wrote:
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.
Am I off base here?
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden