Closed
Description
Version
Platform
Linux 5.19.11-amd64 #1 SMP x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
LD_PRELOAD or link in any library that sets a signal handler and schedules signal delivery (e.g. a posix timer).
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
The library handles own signals.
What do you see instead?
The program crashes.
Additional information
#615 added this code that resets all signal handlers to SIG_DFL:
Lines 426 to 434 in 0c46051
This causes crashes is there is a signal handler installed.
While SIG_IGN can indeed be inherited across execve, all actual handlers (not SIG_IGN/DFL) are reset to SIG_DFL.
So I think the startup code should reset to SIG_DFL iff the handler is set of SIG_IGN. Any real handlers should be left intact.
Metadata
Metadata
Assignees
Labels
No labels