summaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorThurston Dang <thurston@google.com>2023-05-13 05:56:28 +0000
committerThurston Dang <thurston@google.com>2023-05-13 05:56:28 +0000
commitd9377c1deda2fa1ba8ee7a0a59831d22ec57284f (patch)
tree28d69fd97bf8f3c839b56fe8785d6e01be46ca43 /compiler-rt
parent04fd535409ddc601a4654e38ff28db3f13c10713 (diff)
downloadllvm-d9377c1deda2fa1ba8ee7a0a59831d22ec57284f.tar.gz
ASan: unbreak Windows build by limiting backtrace* tests to glibc
My newly added backtrace test (https://reviews.llvm.org/D150491) broke the Windows buildbot (https://lab.llvm.org/buildbot/#/builders/127/builds/48103) because they do not have execinfo.h. I expect the same will happen with the backtrace_symbols test (https://reviews.llvm.org/D150498) as well. This patch does a quick fix by restricting the test scope to glibc-2.27. (A tricker fix would take into account SANITIZER_INTERCEPT_BACKTRACE, which is defined as (SI_FREEBSD || SI_NETBSD || SI_GLIBC || SI_SOLARIS))
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/test/asan/TestCases/backtrace_interceptor.cpp4
-rw-r--r--compiler-rt/test/asan/TestCases/backtrace_symbols_interceptor.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/test/asan/TestCases/backtrace_interceptor.cpp b/compiler-rt/test/asan/TestCases/backtrace_interceptor.cpp
index 8ffcc0894808..bd9da879fe4d 100644
--- a/compiler-rt/test/asan/TestCases/backtrace_interceptor.cpp
+++ b/compiler-rt/test/asan/TestCases/backtrace_interceptor.cpp
@@ -1,5 +1,9 @@
// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// Windows does not have execinfo.h. For now, be conservative and
+// restrict the test to glibc.
+// REQUIRES: glibc-2.27
+
// Interceptor can cause use-after-free
// (https://github.com/google/sanitizers/issues/321)
// XFAIL: *
diff --git a/compiler-rt/test/asan/TestCases/backtrace_symbols_interceptor.cpp b/compiler-rt/test/asan/TestCases/backtrace_symbols_interceptor.cpp
index a78969408a7f..c89620835039 100644
--- a/compiler-rt/test/asan/TestCases/backtrace_symbols_interceptor.cpp
+++ b/compiler-rt/test/asan/TestCases/backtrace_symbols_interceptor.cpp
@@ -1,5 +1,9 @@
// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// Windows does not have execinfo.h. For now, be conservative and
+// restrict the test to glibc.
+// REQUIRES: glibc-2.27
+
// Test the backtrace_symbols() interceptor.
#include <assert.h>