]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
arm64: Fix PTRACE_TRACEME memcheck/tests/linux/getregset.vgtest testcase.
authorMark Wielaard <mark@klomp.org>
Fri, 14 Dec 2018 13:32:27 +0000 (14:32 +0100)
committerMark Wielaard <mark@klomp.org>
Fri, 14 Dec 2018 13:32:27 +0000 (14:32 +0100)
The sys_ptrace post didn't mark the thread as being in traceme mode.
This occassionally would make the memcheck/tests/linux/getregset.vgtest
testcase fail. With this patch it reliably passes.

coregrind/m_syswrap/syswrap-arm64-linux.c

index 9ef54b40a25e11c5285f878b13698d1891721292..650f5b9f0dc434b3ace220539511dc68d8a53110 100644 (file)
@@ -499,6 +499,9 @@ PRE(sys_ptrace)
 POST(sys_ptrace)
 {
    switch (ARG1) {
+   case VKI_PTRACE_TRACEME:
+         ML_(linux_POST_traceme)(tid);
+         break;
    case VKI_PTRACE_PEEKTEXT:
    case VKI_PTRACE_PEEKDATA:
    case VKI_PTRACE_PEEKUSR: