Mark Wielaard c64c52
commit 43fe4bc236d667257eeebfb4f6bcbe2b92aea455
Mark Wielaard c64c52
Author: Mark Wielaard <mark@klomp.org>
Mark Wielaard c64c52
Date:   Fri Dec 14 14:32:27 2018 +0100
Mark Wielaard c64c52
Mark Wielaard c64c52
    arm64: Fix PTRACE_TRACEME memcheck/tests/linux/getregset.vgtest testcase.
Mark Wielaard c64c52
    
Mark Wielaard c64c52
    The sys_ptrace post didn't mark the thread as being in traceme mode.
Mark Wielaard c64c52
    This occassionally would make the memcheck/tests/linux/getregset.vgtest
Mark Wielaard c64c52
    testcase fail. With this patch it reliably passes.
Mark Wielaard c64c52
Mark Wielaard c64c52
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard c64c52
index 9ef54b4..650f5b9 100644
Mark Wielaard c64c52
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard c64c52
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
Mark Wielaard c64c52
@@ -499,6 +499,9 @@ PRE(sys_ptrace)
Mark Wielaard c64c52
 POST(sys_ptrace)
Mark Wielaard c64c52
 {
Mark Wielaard c64c52
    switch (ARG1) {
Mark Wielaard c64c52
+   case VKI_PTRACE_TRACEME:
Mark Wielaard c64c52
+         ML_(linux_POST_traceme)(tid);
Mark Wielaard c64c52
+         break;
Mark Wielaard c64c52
    case VKI_PTRACE_PEEKTEXT:
Mark Wielaard c64c52
    case VKI_PTRACE_PEEKDATA:
Mark Wielaard c64c52
    case VKI_PTRACE_PEEKUSR: