]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 341800: Don't report stale signal information in ptrace_lwpinfo.
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Jan 2019 19:11:49 +0000 (19:11 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 2 Jan 2019 19:11:49 +0000 (19:11 +0000)
commitf3eb9f3541b27da3d34167074ecc689798af5d9a
tree2fc2b1c71d910d5cdf88bfdb7e3fd49ae91ed8a8
parent4bb9f4cd6276109db8d70ef2c7ccf49dcc7e91f0
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@342704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_sig.c
tests/sys/kern/ptrace_test.c