Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Meaning of @OSF_COPYRIGHT@




On 22 Nov 2008, at 23:43, Jonas Maebe wrote:

Then, in bsd/dev/ppc/unix_signal.c you have in sigreturn():

mask = sigmask(SIGFPE);
if (((ut->uu_sigmask & mask) == 0) && (p->p_sigcatch & mask) && ((p->p_sigignore & mask) == 0)) {
action = ps->ps_sigact[SIGFPE];
if((action != SIG_DFL) && (action != SIG_IGN)) {
thread_enable_fpe(th_act, 1);
}
}


I.e., only here fpu exceptions are enabled again. siglongjmp() does not go through sigreturn(), and hence does not re-enable fpu exceptions.

Looking further, it turns out that you can solve it by reinstalling the SIGFPE signal handler after the signal occurred (see the thread_enable_fpe calls in in setsigvec() in bsd/kern/kern_sig.c). That also works fine now at least (under 10.5.5), but I seem to remember that back in the days, if I did that I'd immediately get the same exception again. Although that might have been with a homebrewn setjmp rather than with sigsetjmp...



Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Meaning of @OSF_COPYRIGHT@ (From: Jonas Maebe <email@hidden>)
 >Re: Meaning of @OSF_COPYRIGHT@ (From: Terry Lambert <email@hidden>)
 >Re: Meaning of @OSF_COPYRIGHT@ (From: Jonas Maebe <email@hidden>)
 >Re: Meaning of @OSF_COPYRIGHT@ (From: Terry Lambert <email@hidden>)
 >Re: Meaning of @OSF_COPYRIGHT@ (From: Jonas Maebe <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.