[compiler-rt] 1d03a54 - Revert "[test] Fix asan/TestCases/Linux/globals-gc-sections-lld.cpp with -fsanitize-address-globals-dead-stripping"

Mitch Phillips via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 14:34:26 PST 2020


Author: Mitch Phillips
Date: 2020-12-07T14:30:53-08:00
New Revision: 1d03a54d9460fa122f0be9bf9018b9a4358745a9

URL: https://github.com/llvm/llvm-project/commit/1d03a54d9460fa122f0be9bf9018b9a4358745a9
DIFF: https://github.com/llvm/llvm-project/commit/1d03a54d9460fa122f0be9bf9018b9a4358745a9.diff

LOG: Revert "[test] Fix asan/TestCases/Linux/globals-gc-sections-lld.cpp with -fsanitize-address-globals-dead-stripping"

This reverts commit 140808768d3e5c0f4e52dd42094650f5d282e34a.

Reason: Broke the upstream bots - discussed offline.

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cpp b/compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cpp
index 24dd1ae5b208..f6edc7032018 100644
--- a/compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cpp
+++ b/compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cpp
@@ -1,11 +1,10 @@
-/// Without instrumenting globals, --gc-sections drops the undefined symbol.
-// RUN: %clangxx_asan %s -o /dev/null -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=0
-/// With -fsanitize-address-globals-dead-stripping and -fdata-sections, a garbage
-/// collectable custom metadata section is used for instrumented globals.
-// RUN: %clangxx_asan %s -o /dev/null -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -fsanitize-address-globals-dead-stripping
+// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=0
+// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=1
 
-// https://github.com/google/sanitizers/issues/260
-// REQUIRES: lld-available
+// https://code.google.com/p/address-sanitizer/issues/detail?id=260
+// REQUIRES: lld
+// FIXME: This may pass on Android, with non-emulated-tls.
+// XFAIL: android
 int undefined();
 
 // On i386 clang adds --export-dynamic when linking with ASan, which adds all


        


More information about the llvm-commits mailing list