From 8d33f08844a171472a59ef3f1ea6edb1e9fb9843 Mon Sep 17 00:00:00 2001 From: Jeroen Dobbelaere Date: Wed, 9 Dec 2020 00:59:47 -0800 Subject: [PATCH] [compiler-rt sanitizer] Use our own PTRACE_GETREGSET if it does not exist. On RH66 does not support 'PTRACE_GETREGSET'. This change makes this part of compiler-rt build again on older os-es Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D91686 --- .../lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp index 2ecf87b..53cfddc 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp @@ -490,6 +490,9 @@ typedef user_regs_struct regs_struct; #ifndef NT_X86_XSTATE #define NT_X86_XSTATE 0x202 #endif +#ifndef PTRACE_GETREGSET +#define PTRACE_GETREGSET 0x4204 +#endif // Compiler may use FP registers to store pointers. static constexpr uptr kExtraRegs[] = {NT_X86_XSTATE, NT_FPREGSET}; -- 2.7.4