site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 22 Nov 2008, at 23:43, Jonas Maebe wrote: Then, in bsd/dev/ppc/unix_signal.c you have in sigreturn(): Jonas _______________________________________________ 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... 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jonas Maebe