[compiler-rt] r179090 - [Sanitizer] fix TSan tests: remove global ctor from sanitizer_common, run load_shared_lib test only in lit

Alexey Samsonov samsonov at google.com
Tue Apr 9 00:46:20 PDT 2013


Author: samsonov
Date: Tue Apr  9 02:46:20 2013
New Revision: 179090

URL: http://llvm.org/viewvc/llvm-project?rev=179090&view=rev
Log:
[Sanitizer] fix TSan tests: remove global ctor from sanitizer_common, run load_shared_lib test only in lit

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc
    compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh
    compiler-rt/trunk/lib/tsan/rtl/Makefile.old

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc?rev=179090&r1=179089&r2=179090&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer.cc Tue Apr  9 02:46:20 2013
@@ -238,8 +238,9 @@ class InternalSymbolizer {
 #endif  // SANITIZER_SUPPORTS_WEAK_HOOKS
 
 class Symbolizer {
+  // This class has no constructor, as global constructors are forbidden in
+  // sanitizer_common. It should be linker initialized instead.
  public:
-  Symbolizer() : modules_fresh_(false) { }
   uptr SymbolizeCode(uptr addr, AddressInfo *frames, uptr max_frames) {
     if (max_frames == 0)
       return 0;

Modified: compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh?rev=179090&r1=179089&r2=179090&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/test_output.sh Tue Apr  9 02:46:20 2013
@@ -36,6 +36,10 @@ if [ "$1" == "" ]; then
       echo SKIPPING FAILING TEST $c
       continue
     fi
+    if [[ $c == */load_shared_lib.cc ]]; then
+      echo TEST $c is not supported
+      continue
+    fi
     COMPILER=$CXX
     case $c in
       *.c) COMPILER=$CC

Modified: compiler-rt/trunk/lib/tsan/rtl/Makefile.old
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/Makefile.old?rev=179090&r1=179089&r2=179090&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/Makefile.old (original)
+++ compiler-rt/trunk/lib/tsan/rtl/Makefile.old Tue Apr  9 02:46:20 2013
@@ -1,8 +1,9 @@
 CXXFLAGS = -fPIE -g -Wall -Werror -fno-builtin -DTSAN_DEBUG=$(DEBUG) -DSANITIZER_DEBUG=$(DEBUG)
+CLANG=clang
 ifeq ($(DEBUG), 0)
   CXXFLAGS += -O3
 endif
-ifeq ($(CXX), clang++)
+ifeq ($(CXX), $(CLANG)++)
   CXXFLAGS+= -Wgnu
 endif
 
@@ -21,7 +22,7 @@ ifeq ($(CXX), g++)
 endif  # CXX=g++
 endif  # DEBUG=0
 
-ifeq ($(CXX), clang++)
+ifeq ($(CXX), $(CLANG)++)
   # Global constructors are banned.
   CXXFLAGS+=-Wglobal-constructors
 endif





More information about the llvm-commits mailing list