[llvm-bugs] [Bug 47896] New: [Regression Sep 16 2020] Build fails, if NT_X86_XSTATE is not defined, in sanitizer_common/tests/sanitizer_stoptheworld_linux_libcdep.cpp

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 19 00:40:41 PDT 2020


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: unassignedbugs at nondot.org
          Reporter: burnus at net-b.de
                CC: llvm-bugs at lists.llvm.org, vitalybuka at google.com

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201019/f6edfd95/attachment.html>


More information about the llvm-bugs mailing list