[Midnightbsd-cvs] [MidnightBSD/src] dd61b6: Don't report stale signal information in ptrace_lw...

Lucas Holt noreply at github.com
Thu Aug 13 16:22:33 EDT 2020


  Branch: refs/heads/stable/1.2
  Home:   https://github.com/MidnightBSD/src
  Commit: dd61b6df447c72dc6c497ebbfa4c2d64d52d8a7b
      https://github.com/MidnightBSD/src/commit/dd61b6df447c72dc6c497ebbfa4c2d64d52d8a7b
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2020-08-13 (Thu, 13 Aug 2020)

  Changed paths:
    M sys/conf/newvers.sh
    M sys/kern/kern_sig.c
    M tests/sys/kern/ptrace_test.c

  Log Message:
  -----------
  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.

Obtained from: FreeBSD svn rev 342704




More information about the Midnightbsd-cvs mailing list