[compiler-rt] 846f335 - [sanitizer] Disable test incompartible with recert GLIBC

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 14 16:26:04 PST 2021


Author: Vitaly Buka
Date: 2021-11-14T16:25:29-08:00
New Revision: 846f33572ee9f7152de27aca38369c3506711e64

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

LOG: [sanitizer] Disable test incompartible with recert GLIBC

Added: 
    

Modified: 
    compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cpp
index 5e6bbad95451..2d536b462ed9 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cpp
@@ -1,7 +1,6 @@
 // RUN: %clangxx -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
-#include <unistd.h>
 
 #if !defined(__GLIBC_PREREQ)
 #define __GLIBC_PREREQ(a, b) 0
@@ -9,17 +8,13 @@
 
 // getauxval() used instead of sysconf() in GetPageSize() is defined starting
 // glbc version 2.16.
-#if __GLIBC_PREREQ(2, 16)
+// Does not work with 2.31 and above at it calls sysconf for SIGSTKSZ.
+#if __GLIBC_PREREQ(2, 16) && !__GLIBC_PREREQ(2, 31)
 extern "C" long sysconf(int name) {
-#  ifdef _SC_SIGSTKSZ
-  // Asan needs this one during initialization but late enough to succeed.
-  if (name == _SC_SIGSTKSZ)
-    return 0x10000;
-#  endif
   fprintf(stderr, "sysconf wrapper called: %d\n", name);
   return 0;
 }
-#endif  // defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 16)
+#endif
 
 int main() {
   // All we need to check is that the sysconf() interceptor defined above was


        


More information about the llvm-commits mailing list