[compiler-rt] f97ca48 - [sanitizer] Fix compilation on older systems

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 22:46:09 PDT 2020


Author: Vitaly Buka
Date: 2020-10-19T22:45:51-07:00
New Revision: f97ca48b1cbbf5da065e94271cb3af4f1c907dd4

URL: https://github.com/llvm/llvm-project/commit/f97ca48b1cbbf5da065e94271cb3af4f1c907dd4
DIFF: https://github.com/llvm/llvm-project/commit/f97ca48b1cbbf5da065e94271cb3af4f1c907dd4.diff

LOG: [sanitizer] Fix compilation on older systems

Fixes https://bugs.llvm.org/show_bug.cgi?id=47896

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp

Removed: 
    


################################################################################
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 6a3c00458efb..eb89f1fddc5b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
@@ -486,6 +486,10 @@ typedef user_regs_struct regs_struct;
 #define REG_SP rsp
 #endif
 #define ARCH_IOVEC_FOR_GETREGSET
+// Support ptrace extensions even when compiled without required kernel support
+#ifndef NT_X86_XSTATE
+#define NT_X86_XSTATE 0x202
+#endif
 // Compiler may use FP registers to store pointers.
 static constexpr uptr kExtraRegs[] = {NT_X86_XSTATE, NT_FPREGSET};
 


        


More information about the llvm-commits mailing list