[compiler-rt] r205623 - [ASan] Explicitly specify -ldl/-lpthread in RUN-lines where needed

Alexey Samsonov samsonov at google.com
Fri Apr 4 05:24:47 PDT 2014


Author: samsonov
Date: Fri Apr  4 07:24:46 2014
New Revision: 205623

URL: http://llvm.org/viewvc/llvm-project?rev=205623&view=rev
Log:
[ASan] Explicitly specify -ldl/-lpthread in RUN-lines where needed

Modified:
    compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/stress_dtls.c
    compiler-rt/trunk/test/asan/TestCases/Linux/tsd_dtor_leak.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc
    compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc
    compiler-rt/trunk/test/asan/TestCases/current_allocated_bytes.cc
    compiler-rt/trunk/test/asan/TestCases/deep_thread_stack.cc
    compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc
    compiler-rt/trunk/test/asan/TestCases/gc-test.cc
    compiler-rt/trunk/test/asan/TestCases/init-order-dlopen.cc
    compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc
    compiler-rt/trunk/test/asan/TestCases/shared-lib-test.cc
    compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc
    compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc
    compiler-rt/trunk/test/asan/TestCases/start-deactivated.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/function-sections-are-bad.cc Fri Apr  4 07:24:46 2014
@@ -1,6 +1,6 @@
 // Check that --gc-sections does not throw away (or localize) parts of sanitizer
 // interface.
-// RUN: %clang_asan %s -Wl,--gc-sections -o %t
+// RUN: %clang_asan %s -Wl,--gc-sections -ldl -o %t
 // RUN: %clang_asan %s -DBUILD_SO -fPIC -o %t-so.so -shared
 // RUN: %t 2>&1
 

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/stress_dtls.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/stress_dtls.c?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/stress_dtls.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/stress_dtls.c Fri Apr  4 07:24:46 2014
@@ -9,7 +9,7 @@
 // RUN: %clangxx_asan -x c -DSO_NAME=f0 %s -shared -o %t-f0.so -fPIC
 // RUN: %clangxx_asan -x c -DSO_NAME=f1 %s -shared -o %t-f1.so -fPIC
 // RUN: %clangxx_asan -x c -DSO_NAME=f2 %s -shared -o %t-f2.so -fPIC
-// RUN: %clangxx_asan %s -o %t
+// RUN: %clangxx_asan %s -ldl -lpthread -o %t
 // RUN: %t 0 3
 // RUN: %t 2 3
 // RUN: ASAN_OPTIONS=verbosity=2 %t 10 2 2>&1 | FileCheck %s

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/tsd_dtor_leak.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/tsd_dtor_leak.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/tsd_dtor_leak.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/tsd_dtor_leak.cc Fri Apr  4 07:24:46 2014
@@ -1,6 +1,6 @@
 // Regression test for a leak in tsd:
 // https://code.google.com/p/address-sanitizer/issues/detail?id=233
-// RUN: %clangxx_asan -O1 %s -o %t
+// RUN: %clangxx_asan -O1 %s -lpthread -o %t
 // RUN: ASAN_OPTIONS=quarantine_size=1 %t
 #include <pthread.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/unpoison_tls.cc Fri Apr  4 07:24:46 2014
@@ -1,7 +1,7 @@
 // Test that TLS is unpoisoned on thread death.
 // REQUIRES: x86_64-supported-target,i386-supported-target
 
-// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1
+// RUN: %clangxx_asan -O1 %s -lpthread -o %t && %t 2>&1
 
 #include <assert.h>
 #include <pthread.h>

Modified: compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/asan-symbolize-sanity-test.cc Fri Apr  4 07:24:46 2014
@@ -2,7 +2,7 @@
 // shared object files.
 
 // RUN: %clangxx_asan -O0 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O0 %s -o %t
+// RUN: %clangxx_asan -O0 %s -ldl -o %t
 // RUN: ASAN_OPTIONS=symbolize=0 not %t 2>&1 | %asan_symbolize | FileCheck %s
 #include <dlfcn.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/asan/TestCases/current_allocated_bytes.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/current_allocated_bytes.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/current_allocated_bytes.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/current_allocated_bytes.cc Fri Apr  4 07:24:46 2014
@@ -1,5 +1,5 @@
-// RUN: %clangxx_asan -O0 %s -o %t && %t
-// RUN: %clangxx_asan -O2 %s -o %t && %t
+// RUN: %clangxx_asan -O0 %s -lpthread -o %t && %t
+// RUN: %clangxx_asan -O2 %s -lpthread -o %t && %t
 
 #include <assert.h>
 #include <pthread.h>

Modified: compiler-rt/trunk/test/asan/TestCases/deep_thread_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/deep_thread_stack.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/deep_thread_stack.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/deep_thread_stack.cc Fri Apr  4 07:24:46 2014
@@ -1,7 +1,7 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
 
 #include <pthread.h>
 

Modified: compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc Fri Apr  4 07:24:46 2014
@@ -14,18 +14,14 @@
 // It works on i368/x86_64 Linux, but not necessary anywhere else.
 // REQUIRES: x86_64-supported-target,i386-supported-target
 
-// RUN: %clangxx_asan -O0 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O0 %s -ldl -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O1 %s -ldl -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O2 %s -ldl -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %p/SharedLibs/dlclose-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O3 %s -ldl -o %t && %t 2>&1 | FileCheck %s
 
 #include <assert.h>
 #include <dlfcn.h>

Modified: compiler-rt/trunk/test/asan/TestCases/gc-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/gc-test.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/gc-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/gc-test.cc Fri Apr  4 07:24:46 2014
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan  %s -o %t
+// RUN: %clangxx_asan %s -lpthread -o %t
 // RUN: ASAN_OPTIONS=detect_stack_use_after_return=1 %t 2>&1 | FileCheck %s --check-prefix=CHECK1
 // RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %t 2>&1 | FileCheck %s --check-prefix=CHECK0
 

Modified: compiler-rt/trunk/test/asan/TestCases/init-order-dlopen.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/init-order-dlopen.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/init-order-dlopen.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/init-order-dlopen.cc Fri Apr  4 07:24:46 2014
@@ -10,8 +10,8 @@
 // If the linker doesn't support --export-dynamic (which is ELF-specific),
 // try to link without that option.
 // FIXME: find a better solution.
-// RUN: %clangxx_asan -O0 %s -o %t -Wl,--export-dynamic || \
-// RUN:     %clangxx_asan -O0 %s -o %t
+// RUN: %clangxx_asan -O0 %s -lpthread -ldl -o %t -Wl,--export-dynamic || \
+// RUN:     %clangxx_asan -O0 %s -lpthread -ldl -o %t
 // RUN: ASAN_OPTIONS=strict_init_order=true %t 2>&1 | FileCheck %s
 #include <dlfcn.h>
 #include <pthread.h>

Modified: compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/init-order-pthread-create.cc Fri Apr  4 07:24:46 2014
@@ -1,7 +1,7 @@
 // Check that init-order checking is properly disabled if pthread_create is
 // called.
 
-// RUN: %clangxx_asan %s %p/Helpers/init-order-pthread-create-extra.cc -o %t
+// RUN: %clangxx_asan %s %p/Helpers/init-order-pthread-create-extra.cc -lpthread -o %t
 // RUN: ASAN_OPTIONS=strict_init_order=true %t
 
 #include <stdio.h>

Modified: compiler-rt/trunk/test/asan/TestCases/shared-lib-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/shared-lib-test.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/shared-lib-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/shared-lib-test.cc Fri Apr  4 07:24:46 2014
@@ -1,15 +1,11 @@
-// RUN: %clangxx_asan -O0 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O0 %s -o %t && not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O1 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O1 %s -o %t && not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O2 %s -o %t && not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -O3 %s -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O0 %s -ldl -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O1 %s -ldl -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O2 %s -ldl -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %p/SharedLibs/shared-lib-test-so.cc -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O3 %s -ldl -o %t && not %t 2>&1 | FileCheck %s
 
 #include <dlfcn.h>
 #include <stdio.h>

Modified: compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-overflow.cc Fri Apr  4 07:24:46 2014
@@ -1,18 +1,18 @@
 // Test ASan detection of stack-overflow condition.
 
-// RUN: %clangxx_asan -O0 %s -DSMALL_FRAME -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DSMALL_FRAME -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -DSAVE_ALL_THE_REGISTERS -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DSAVE_ALL_THE_REGISTERS -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
 
-// RUN: %clangxx_asan -O0 %s -DTHREAD -DSMALL_FRAME -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DTHREAD -DSMALL_FRAME -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O0 %s -DTHREAD -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O3 %s -DTHREAD -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DTHREAD -DSMALL_FRAME -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DTHREAD -DSAVE_ALL_THE_REGISTERS -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -DTHREAD -lpthread -o %t && ASAN_OPTIONS=use_sigaltstack=1 not %t 2>&1 | FileCheck %s
 
 #include <assert.h>
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/stack-use-after-return.cc Fri Apr  4 07:24:46 2014
@@ -1,20 +1,14 @@
 // RUN: export ASAN_OPTIONS=detect_stack_use_after_return=1
-// RUN: %clangxx_asan  -O0 %s -o %t && \
-// RUN:   not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan  -O1 %s -o %t && \
-// RUN:   not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan  -O2 %s -o %t && \
-// RUN:   not %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan  -O3 %s -o %t && \
-// RUN:   not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan  -O0 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan  -O1 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan  -O2 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan  -O3 %s -lpthread -o %t && not %t 2>&1 | FileCheck %s
 // RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %t
 // Regression test for a CHECK failure with small stack size and large frame.
-// RUN: %clangxx_asan  -O3 %s -o %t -DkSize=10000 -DUseThread -DkStackSize=65536 && \
-// RUN:   not %t 2>&1 | FileCheck --check-prefix=THREAD %s
+// RUN: %clangxx_asan  -O3 %s -lpthread -o %t -DkSize=10000 -DUseThread -DkStackSize=65536 && not %t 2>&1 | FileCheck --check-prefix=THREAD %s
 //
 // Test that we can find UAR in a thread other than main:
-// RUN: %clangxx_asan  -DUseThread -O2 %s -o %t && \
-// RUN:   not %t 2>&1 | FileCheck --check-prefix=THREAD %s
+// RUN: %clangxx_asan  -DUseThread -O2 %s -lpthread -o %t && not %t 2>&1 | FileCheck --check-prefix=THREAD %s
 //
 // Test the max_uar_stack_size_log/min_uar_stack_size_log flag.
 //

Modified: compiler-rt/trunk/test/asan/TestCases/start-deactivated.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/start-deactivated.cc?rev=205623&r1=205622&r2=205623&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/start-deactivated.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/start-deactivated.cc Fri Apr  4 07:24:46 2014
@@ -2,10 +2,9 @@
 // Main executable is uninstrumented, but linked to ASan runtime. The shared
 // library is instrumented. Memory errors before dlopen are not detected.
 
-// RUN: %clangxx_asan -O0 %p/SharedLibs/start-deactivated-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
+// RUN: %clangxx_asan -O0 %p/SharedLibs/start-deactivated-so.cc -fPIC -shared -o %t-so.so
 // RUN: %clangxx -O0 %s -c -o %t.o
-// RUN: %clangxx_asan -O0 %t.o -o %t
+// RUN: %clangxx_asan -O0 %t.o -ldl -o %t
 // RUN: ASAN_OPTIONS=start_deactivated=1 not %t 2>&1 | FileCheck %s
 
 #include <dlfcn.h>





More information about the llvm-commits mailing list