Bug 506890

Summary: Support SIGSTKFLT and SIGSYS on linux
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.25.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 506971    

Description Mark Wielaard 2025-07-10 21:33:12 UTC
The LTP kill11 testcase tries all signals.
SIGSTKFLT defaults to term and is easy to support just add something like the following to default_action in coregrind/m_signals.c

+#     if defined(VKI_SIGSTKFLT)
+      case VKI_SIGSTKFLT: /* term */
+#     endif

SIGSYS is already handled by freebsd and needs some tweaks to calculate_SKSS_from_SCSS and sync_signalhandler
Comment 1 Mark Wielaard 2025-07-11 21:40:22 UTC
This is also why the LTP waitpid01 testcase fails.
Comment 2 Mark Wielaard 2025-07-14 22:26:44 UTC
commit 969bccaaca7aab2614def013ac1f37de37fbce86
Author: Mark Wielaard <mark@klomp.org>
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