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

            Bug ID: 47896
           Summary: [Regression Sep 16 2020]  Build fails, if
                    NT_X86_XSTATE is not defined, in
                    sanitizer_common/tests/sanitizer_stoptheworld_linux_li
                    bcdep.cpp
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Keywords: build-problem, portability
          Severity: enhancement
          Priority: P
         Component: compiler-rt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Regression caused by https://reviews.llvm.org/D87754
  [Lsan] Use fp registers to search for pointers
https://github.com/llvm/llvm-project/commit/5813fca1076089c835de737834955a0fe7eb3898

Using an older GLIBC 2.11.1 as cross-build symroot causes the fail:
  sanitizer_common/tests/sanitizer_stoptheworld_linux_libcdep.cpp:490:39:
    error: 'NT_X86_XSTATE' was not declared in this scope

as elf.h does not yet include NT_X86_XSTATE

Possible patch:

--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
@@ -490 +490,5 @@ typedef user_regs_struct regs_struct;
-static constexpr uptr kExtraRegs[] = {NT_X86_XSTATE, NT_FPREGSET};
+static constexpr uptr kExtraRegs[] = {
+#ifdef NT_X86_XSTATE
+                                      NT_X86_XSTATE,
+#endif
+                                      NT_FPREGSET};

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to