]> granicus.if.org Git - strace/commit
Fix misleading stray PTRACE_EVENT_EXEC diagnostics
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Jul 2019 16:12:44 +0000 (16:12 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Jul 2019 16:12:44 +0000 (16:12 +0000)
commiteab4c772516af3365e6fcf82f6a48b4b94370b95
tree1b951831c91b3a9712927cd046e4d8a5aba07818
parentd342f4753a1bba4593b00b8857df290a20e404bf
Fix misleading stray PTRACE_EVENT_EXEC diagnostics

If current_tcp is to be switched, entering(current_tcp) is irrelevant.

* strace.c (maybe_switch_tcbs): Update comment.
(dispatch_event) <case TE_STOP_BEFORE_EXECVE>: Invoke
maybe_switch_current_tcp early, skip the check for a stray
PTRACE_EVENT_EXEC if current_tcp was switched.
* tests/maybe_switch_current_tcp.c: New file.
* tests/pure_executables.list: Add maybe_switch_current_tcp.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (maybe_switch_current_tcp): New entry.
* tests/Makefile.am (maybe_switch_current_tcp_LDADD): New variable.
strace.c
tests/.gitignore
tests/Makefile.am
tests/gen_tests.in
tests/maybe_switch_current_tcp.c [new file with mode: 0644]
tests/pure_executables.list