From: Vitaly Buka Date: Tue, 20 Oct 2020 05:44:34 +0000 (-0700) Subject: Fix compilation on older systems X-Git-Tag: basepoints/gcc-12~4141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00b355522b7843f4d9d93172aa7521b223b77587;p=thirdparty%2Fgcc.git Fix compilation on older systems Cherry-pick upstream commit f97ca48b1cbbf5da065e94271cb3af4f1c907dd4. Fixes https://bugs.llvm.org/show_bug.cgi?id=47896 --- diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp index 6a3c00458efb..eb89f1fddc5b 100644 --- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp +++ b/libsanitizer/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};