From: Mark Wielaard Date: Mon, 14 Jul 2025 22:00:44 +0000 (+0200) Subject: Handle SIGSYS and SIGSTKFLT when defined X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=969bccaaca7aab2614def013ac1f37de37fbce86;p=thirdparty%2Fvalgrind.git Handle SIGSYS and SIGSTKFLT when defined Both signals were already partially handled. But calculate_SKSS_from_SCSS only handled SIGSYS on freebsd. default_action didn't handle SIGSTKFLT. And sync_signalhandler didn't expect to have to handle SIGSYS. This fixes LTP tests kill11 and waitpid01. https://bugs.kde.org/show_bug.cgi?id=506890 --- diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index cccbb5683..523f4d7fc 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -855,7 +855,7 @@ void calculate_SKSS_from_SCSS ( SKSS* dst ) case VKI_SIGFPE: case VKI_SIGILL: case VKI_SIGTRAP: -#if defined(VGO_freebsd) +#if defined(VKI_SIGSYS) case VKI_SIGSYS: #endif /* For these, we always want to catch them and report, even @@ -1832,6 +1832,9 @@ static void default_action(const vki_siginfo_t *info, ThreadId tid) case VKI_SIGPIPE: /* term */ case VKI_SIGALRM: /* term */ case VKI_SIGTERM: /* term */ +# if defined(VKI_SIGSTKFLT) + case VKI_SIGSTKFLT: /* term */ +# endif case VKI_SIGUSR1: /* term */ case VKI_SIGUSR2: /* term */ case VKI_SIGIO: /* term */ @@ -3004,6 +3007,9 @@ void sync_signalhandler ( Int sigNo, || sigNo == VKI_SIGBUS || sigNo == VKI_SIGFPE || sigNo == VKI_SIGILL +#if defined(VKI_SIGSYS) + || sigNo == VKI_SIGSYS +#endif || sigNo == VKI_SIGTRAP); info->si_code = sanitize_si_code(info->si_code);