NetBSD-Bugs archive

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

Re: misc/56820: Many FPE related tests fail on softfloat machines



The following reply was made to PR misc/56820; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: misc/56820: Many FPE related tests fail on softfloat machines
Date: Tue, 3 Oct 2023 20:11:20 +0200

 I like the unblocking/default action aproach, but I'm not sure
 I understand the "if that returns w/o existing" part.
 
 The code that posts the signal is src/lib/libc/softfloat/softfloat-specialize
 around line 95:
 
         memset(&info, 0, sizeof info);
         info.si_signo = SIGFPE;
         info.si_pid = getpid(); 
         info.si_uid = geteuid();   
         if (flags & float_flag_underflow)
             info.si_code = FPE_FLTUND;
         else if (flags & float_flag_overflow)
             info.si_code = FPE_FLTOVF;
         else if (flags & float_flag_divbyzero)
             info.si_code = FPE_FLTDIV;
         else if (flags & float_flag_invalid)
             info.si_code = FPE_FLTINV;
         else if (flags & float_flag_inexact)
             info.si_code = FPE_FLTRES;
         sigqueueinfo(getpid(), &info);
 
 
 Wouldn't it be good enough to always call sigprocmask to unblock SIGFPE
 and then check sigaction old state and if it is SIG_IGN set it to SIG_DFL?
 
 Martin
 


Home | Main Index | Thread Index | Old Index