Blame SOURCES/valgrind-3.14.0-arm64-ptrace-traceme.patch

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