From: Mark W. <ma...@so...> - 2025-07-14 22:26:26
|
https://sourceware.org/cgit/valgrind/commit/?id=969bccaaca7aab2614def013ac1f37de37fbce86 commit 969bccaaca7aab2614def013ac1f37de37fbce86 Author: Mark Wielaard <ma...@kl...> Date: Tue Jul 15 00:00:44 2025 +0200 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: --- coregrind/m_signals.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index cccbb56832..523f4d7fcb 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); |