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

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