]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 341800: Don't report stale signal information in ptrace_lwpinfo.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 2 Jan 2019 19:11:49 +0000 (19:11 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 2 Jan 2019 19:11:49 +0000 (19:11 +0000)
commit4b8c1bf796290f63ecb6ba5d7bef876c832c58b2
treec6fb71aba2b32a3a0f89a1b0adefb18d57e16245
parente564ae74a13896ed3883476bea21fdd9994622f1
MFC 341800: Don't report stale signal information in ptrace_lwpinfo.

Once a signal's siginfo was copied to 'td_si' as part of the signal
exchange in issignal(), it was never cleared.  This caused future
thread events that are reported as SIGTRAP events without signal
information to report the stale siginfo in 'td_si'.  For example, if a
debugger created a new process and used SIGSTOP to stop it after
PT_ATTACH, future system call entry / exit events would set PL_FLAG_SI
with the SIGSTOP siginfo in pl_siginfo.  This broke 'catch syscall' in
current versions of gdb as it assumed PL_FLAG_SI with SIGTRAP
indicates a breakpoint or single step trap.
sys/kern/kern_sig.c
tests/sys/kern/ptrace_test.c