[ASan] create separate configs for running ASan lit tests in both 32- and 64-bit...
authorAlexey Samsonov <samsonov@google.com>
Fri, 7 Jun 2013 09:38:55 +0000 (09:38 +0000)
committerAlexey Samsonov <samsonov@google.com>
Fri, 7 Jun 2013 09:38:55 +0000 (09:38 +0000)
llvm-svn: 183498

73 files changed:
compiler-rt/lib/asan/lit_tests/32bitConfig/lit.site.cfg.in [new file with mode: 0644]
compiler-rt/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in [new file with mode: 0644]
compiler-rt/lib/asan/lit_tests/CMakeLists.txt
compiler-rt/lib/asan/lit_tests/TestCases/Darwin/interface_symbols_darwin.c
compiler-rt/lib/asan/lit_tests/TestCases/Darwin/reexec-insert-libraries-env.cc
compiler-rt/lib/asan/lit_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/asan_prelink_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/clone_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/glob.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/initialization-bug-any-order.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/interception_failure_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/interception_malloc_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/interception_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/interface_symbols_linux.c
compiler-rt/lib/asan/lit_tests/TestCases/Linux/malloc-in-qsort.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/overflow-in-qsort.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/swapcontext_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/syscalls.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/time_null_regtest.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/unpoison_tls.cc
compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow.cc [deleted file]
compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc [new file with mode: 0644]
compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc [new file with mode: 0644]
compiler-rt/lib/asan/lit_tests/TestCases/allow_user_segv.cc
compiler-rt/lib/asan/lit_tests/TestCases/blacklist.cc
compiler-rt/lib/asan/lit_tests/TestCases/deep_stack_uaf.cc
compiler-rt/lib/asan/lit_tests/TestCases/deep_tail_call.cc
compiler-rt/lib/asan/lit_tests/TestCases/deep_thread_stack.cc
compiler-rt/lib/asan/lit_tests/TestCases/dlclose-test.cc
compiler-rt/lib/asan/lit_tests/TestCases/double-free.cc
compiler-rt/lib/asan/lit_tests/TestCases/force_inline_opt0.cc
compiler-rt/lib/asan/lit_tests/TestCases/global-demangle.cc
compiler-rt/lib/asan/lit_tests/TestCases/global-overflow.cc
compiler-rt/lib/asan/lit_tests/TestCases/heap-overflow.cc
compiler-rt/lib/asan/lit_tests/TestCases/huge_negative_hea_oob.cc
compiler-rt/lib/asan/lit_tests/TestCases/init-order-atexit.cc
compiler-rt/lib/asan/lit_tests/TestCases/init-order-dlopen.cc
compiler-rt/lib/asan/lit_tests/TestCases/initialization-blacklist.cc
compiler-rt/lib/asan/lit_tests/TestCases/initialization-bug.cc
compiler-rt/lib/asan/lit_tests/TestCases/initialization-constexpr.cc
compiler-rt/lib/asan/lit_tests/TestCases/initialization-nobug.cc
compiler-rt/lib/asan/lit_tests/TestCases/interface_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/invalid-free.cc
compiler-rt/lib/asan/lit_tests/TestCases/large_func_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/malloc_fill.cc
compiler-rt/lib/asan/lit_tests/TestCases/memcmp_strict_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/memcmp_test.cc
compiler-rt/lib/asan/lit_tests/TestCases/null_deref.cc
compiler-rt/lib/asan/lit_tests/TestCases/partial_right.cc
compiler-rt/lib/asan/lit_tests/TestCases/sanity_check_pure_c.c
compiler-rt/lib/asan/lit_tests/TestCases/shared-lib-test.cc
compiler-rt/lib/asan/lit_tests/TestCases/sleep_before_dying.c
compiler-rt/lib/asan/lit_tests/TestCases/stack-frame-demangle.cc
compiler-rt/lib/asan/lit_tests/TestCases/stack-oob-frames.cc
compiler-rt/lib/asan/lit_tests/TestCases/stack-overflow.cc
compiler-rt/lib/asan/lit_tests/TestCases/stack-use-after-return.cc
compiler-rt/lib/asan/lit_tests/TestCases/strip_path_prefix.c
compiler-rt/lib/asan/lit_tests/TestCases/strncpy-overflow.cc
compiler-rt/lib/asan/lit_tests/TestCases/time_interceptor.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-free-right.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-poison.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-dtor-order.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-nobug.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc
compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope.cc
compiler-rt/lib/asan/lit_tests/TestCases/wait.cc
compiler-rt/lib/asan/lit_tests/lit.cfg
compiler-rt/lib/asan/lit_tests/lit.site.cfg.in [deleted file]
compiler-rt/lib/lit.common.cfg
compiler-rt/lib/ubsan/lit_tests/lit.cfg

diff --git a/compiler-rt/lib/asan/lit_tests/32bitConfig/lit.site.cfg.in b/compiler-rt/lib/asan/lit_tests/32bitConfig/lit.site.cfg.in
new file mode 100644 (file)
index 0000000..99496c2
--- /dev/null
@@ -0,0 +1,13 @@
+## Autogenerated by LLVM/Clang configuration.
+# Do not edit!
+
+# Load common config for all compiler-rt lit tests.
+lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+
+# Tool-specific config options.
+config.asan_source_dir = "@ASAN_SOURCE_DIR@"
+config.bits = "32"
+
+# Load tool-specific config that would do the real work.
+lit.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/lit.cfg")
+
diff --git a/compiler-rt/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in b/compiler-rt/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in
new file mode 100644 (file)
index 0000000..94b0228
--- /dev/null
@@ -0,0 +1,12 @@
+## Autogenerated by LLVM/Clang configuration.
+# Do not edit!
+
+# Load common config for all compiler-rt lit tests.
+lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+
+# Tool-specific config options.
+config.asan_source_dir = "@ASAN_SOURCE_DIR@"
+config.bits = "64"
+
+# Load tool-specific config that would do the real work.
+lit.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/lit.cfg")
index d2420b50da837e0e66005112dcf5148b40116687..b65d3474295335cb28569dc5c5c75fc63e0fce3a 100644 (file)
@@ -2,8 +2,13 @@ set(ASAN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
 set(ASAN_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/..)
 
 configure_lit_site_cfg(
-  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
-  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+  ${CMAKE_CURRENT_SOURCE_DIR}/64bitConfig/lit.site.cfg.in
+  ${CMAKE_CURRENT_BINARY_DIR}/64bitConfig/lit.site.cfg
+  )
+
+configure_lit_site_cfg(
+  ${CMAKE_CURRENT_SOURCE_DIR}/32bitConfig/lit.site.cfg.in
+  ${CMAKE_CURRENT_BINARY_DIR}/32bitConfig/lit.site.cfg
   )
 
 configure_lit_site_cfg(
@@ -12,21 +17,27 @@ configure_lit_site_cfg(
   )
 
 if(COMPILER_RT_CAN_EXECUTE_TESTS)
+  set(ASAN_TESTSUITES)
+  if(CAN_TARGET_i386)
+    list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/32bitConfig)
+  endif()
+  if(CAN_TARGET_x86_64 OR CAN_TARGET_powerpc64)
+    list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/64bitConfig)
+  endif()
   # Run ASan tests only if we're sure we may produce working binaries.
   set(ASAN_TEST_DEPS
     ${SANITIZER_COMMON_LIT_TEST_DEPS}
     ${ASAN_RUNTIME_LIBRARIES}
     asan_blacklist)
   set(ASAN_TEST_PARAMS
-    asan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-    )
+    asan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
   if(LLVM_INCLUDE_TESTS)
     list(APPEND ASAN_TEST_DEPS AsanUnitTests)
+    list(APPEND ASAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit)
   endif()
   add_lit_testsuite(check-asan "Running the AddressSanitizer tests"
-    ${CMAKE_CURRENT_BINARY_DIR}
+    ${ASAN_TESTSUITES}
     PARAMS ${ASAN_TEST_PARAMS}
-    DEPENDS ${ASAN_TEST_DEPS}
-    )
+    DEPENDS ${ASAN_TEST_DEPS})
   set_target_properties(check-asan PROPERTIES FOLDER "ASan tests")
 endif()
index 85bf7a5e02cd950a6465859bcfe5af52a7d1a65a..319175aad02e0c53aae4f4f505723a6a87d21d4f 100644 (file)
@@ -2,7 +2,7 @@
 // If you're changing this file, please also change
 // ../Linux/interface_symbols.c
 
-// RUN: %clang -fsanitize=address -dead_strip -O2 %s -o %t.exe
+// RUN: %clang_asan -dead_strip -O2 %s -o %t.exe
 // RUN: rm -f %t.symbols %t.interface
 
 // RUN: nm -g `otool -L %t.exe | grep "asan_osx_dynamic.dylib" | \
index 40a459fd84dbf0705493906656a296dd5f4d5b62..208fe43ac7e4043fd2f726e5d12974ee834da397 100644 (file)
@@ -2,8 +2,8 @@
 // This is a regression test for
 // https://code.google.com/p/address-sanitizer/issues/detail?id=159
 
-// RUN: %clangxx_asan -m64 %s -o %t
-// RUN: %clangxx -m64 %p/../SharedLibs/darwin-dummy-shared-lib-so.cc \
+// RUN: %clangxx_asan %s -o %t
+// RUN: %clangxx %p/../SharedLibs/darwin-dummy-shared-lib-so.cc \
 // RUN:     -dynamiclib -o darwin-dummy-shared-lib-so.dylib
 
 // FIXME: the following command line may hang in the case of a regression.
index cf89949cf94283bcdb39f202e97355c9aa9c3a01..3c34e3736951bfe05b52c1f6e321b3d53efbf5b3 100644 (file)
@@ -1,8 +1,8 @@
 // Make sure ASan removes the runtime library from DYLD_INSERT_LIBRARIES before
 // executing other programs.
 
-// RUN: %clangxx_asan -m64 %s -o %t
-// RUN: %clangxx -m64 %p/../SharedLibs/darwin-dummy-shared-lib-so.cc \
+// RUN: %clangxx_asan %s -o %t
+// RUN: %clangxx %p/../SharedLibs/darwin-dummy-shared-lib-so.cc \
 // RUN:     -dynamiclib -o darwin-dummy-shared-lib-so.dylib
 
 // Make sure DYLD_INSERT_LIBRARIES doesn't contain the runtime library before
index c209c39c8c42ff3361fcc7f37aa5a8490eaed58c..0f158c1bb3dde76af443d496f54e122511cd2f62 100644 (file)
@@ -3,13 +3,13 @@
 // or gold's flag -Ttext (we try the first flag first, if that fails we
 // try the second flag).
 //
-// RUN: %clangxx_asan -m64 -c %s -o %t.o
-// RUN: %clangxx_asan -m64 -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext-segment=0x3600000000 ||\
-// RUN: %clangxx_asan -m64 -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext=0x3600000000
-// RUN: %clangxx_asan -m64 %t.o %t.so -Wl,-R. -o %t
+// RUN: %clangxx_asan -c %s -o %t.o
+// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext-segment=0x3600000000 ||\
+// RUN: %clangxx_asan -DBUILD_SO=1 -fPIC -shared %s -o %t.so -Wl,-Ttext=0x3600000000
+// RUN: %clangxx_asan %t.o %t.so -Wl,-R. -o %t
 // RUN: ASAN_OPTIONS=verbosity=1 %t 2>&1 | FileCheck %s
 
-// REQUIRES: x86_64-supported-target
+// REQUIRES: x86_64-supported-target, asan-64-bits
 #if BUILD_SO
 int G;
 int *getG() {
index ca13b22425f2926f922e50164f7b316e1fdcedf7..0e12f35b400afee57c3864d3b5fd90d613754715 100644 (file)
@@ -1,14 +1,10 @@
 // Regression test for:
 // http://code.google.com/p/address-sanitizer/issues/detail?id=37
 
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t | FileCheck %s
 
 #include <stdio.h>
 #include <sched.h>
index e05228ff39e3eb09c2f11b159e0c5d0dcff82387..a375f1b67c840a3f431921866a68dadbb2646e30 100644 (file)
@@ -1,7 +1,5 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t %p 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t %p 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t %p 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t %p 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t %p 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t %p 2>&1 | FileCheck %s
 
 #include <assert.h>
 #include <glob.h>
index c0f4560fb4e71fe93777b13bddaa8fddfc4672bb..2c1b707026bc92d71b6803838d9750ca37b3750a 100644 (file)
@@ -1,8 +1,6 @@
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O0 %s -o %t && \
+// RUN: %clangxx_asan -fsanitize=use-after-return -O0 %s -o %t && \
 // RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O2 %s -o %t && \
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O2 %s -o %t && \
+// RUN: %clangxx_asan -fsanitize=use-after-return -O2 %s -o %t && \
 // RUN:   %t 2>&1 | %symbolize | FileCheck %s
 
 #include <stdio.h>
index 4f41dda18128e9d58b89df35e5c91a1c8a8b39f6..c33f5cc776f0c157750c010447d35b17aff36592 100644 (file)
@@ -3,10 +3,10 @@
 // independently on order in which we list source files (if we specify
 // strict init-order checking).
 
-// RUN: %clangxx_asan -m64 -O0 %s %p/../Helpers/initialization-bug-extra.cc -o %t
+// RUN: %clangxx_asan -O0 %s %p/../Helpers/initialization-bug-extra.cc -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 \
 // RUN:    | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O0 %p/../Helpers/initialization-bug-extra.cc %s -o %t
+// RUN: %clangxx_asan -O0 %p/../Helpers/initialization-bug-extra.cc %s -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 \
 // RUN:    | %symbolize | FileCheck %s
 
index dfad909f528c2babf2012ff3a40e06960f6fcf28..9d161aa2dccbc5cb69228690bf20dfdc5eb01536 100644 (file)
@@ -1,14 +1,10 @@
 // If user provides his own libc functions, ASan doesn't
 // intercept these functions.
 
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s
 #include <stdlib.h>
 #include <stdio.h>
 
index 8f66788e9a8275a148b9b80678aca0248c5c3765..ca9083240a0c71300a162ca13aee45dc77496210 100644 (file)
@@ -1,13 +1,9 @@
 // ASan interceptor can be accessed with __interceptor_ prefix.
 
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
index 94fb499f2f87cf4aebbae05dd38e677fd3ffba53..0778b20b7c57ff72c8509325406ec716f5f8f0c9 100644 (file)
@@ -1,13 +1,9 @@
 // ASan interceptor can be accessed with __interceptor_ prefix.
 
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s
 #include <stdlib.h>
 #include <stdio.h>
 
index b5cfa09a1e319d6203a44684192f4a1f5341f887..baabc0598f07010a5b3fd432e9c8e3ec78063b2b 100644 (file)
@@ -1,6 +1,6 @@
 // Check the presense of interface symbols in compiled file.
 
-// RUN: %clang -fsanitize=address -O2 %s -o %t.exe
+// RUN: %clang_asan -O2 %s -o %t.exe
 // RUN: nm -D %t.exe | grep " T " | sed "s/.* T //" \
 // RUN:    | grep "__asan_" | sed "s/___asan_/__asan_/" \
 // RUN:    | grep -v "__asan_malloc_hook" \
index ee2e81f0d2ab841432225c57580dbe17249c66d6..32c2ca7ea051142aa8c0da1c6bcffeedd6976343 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O2 %s -o %t
+// RUN: %clangxx_asan -O2 %s -o %t
 // RUN: ASAN_OPTIONS=fast_unwind_on_malloc=1 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-FAST
 // RUN: ASAN_OPTIONS=fast_unwind_on_malloc=0 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-SLOW
 
index 8bc43ca0a5c3cc3020ac3f6826a01daaded40bb4..19e73f67c49ba9713dda36f7356e416207f1a190 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O2 %s -o %t
+// RUN: %clangxx_asan -O2 %s -o %t
 // RUN: ASAN_OPTIONS=fast_unwind_on_fatal=1 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-FAST
 // RUN: ASAN_OPTIONS=fast_unwind_on_fatal=0 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-SLOW
 
index 47a8d9891f51a4666bbd966ed43219c6713fa14e..6cbb69a35321bad686ced8484a1373f43257656e 100644 (file)
@@ -1,13 +1,9 @@
 // Check that ASan plays well with easy cases of makecontext/swapcontext.
 
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s
 //
 // This test is too sublte to try on non-x86 arch for now.
 // REQUIRES: x86_64-supported-target,i386-supported-target
index b2edcfb923759b18e4cba163bbb0c79932141525..e7acdba07ec871c0320f25639abb5a2ae6b07a86 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <assert.h>
 #include <errno.h>
index 975bca3d105ac415b19d5a1715bc3e904552bd1a..7579a44644f4ec43df56104a313d58d3cafb4c62 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 %s -fsanitize-address-zero-base-shadow -pie -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -fsanitize-address-zero-base-shadow -pie -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 // Zero-base shadow only works on x86_64 and i386.
 // REQUIRES: x86_64-supported-target
index 08e7d86f663b39ce371a77bc03b6bcacf05301ae..d67c4f954e43bb6bf682dc67fe27a383a105c2bb 100644 (file)
@@ -1,8 +1,7 @@
 // Test that TLS is unpoisoned on thread death.
 // REQUIRES: x86_64-supported-target,i386-supported-target
 
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1
 
 #include <assert.h>
 #include <pthread.h>
diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow.cc b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow.cc
deleted file mode 100644 (file)
index 682e7e8..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clangxx_asan -m64 -O0 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-64 < %t.out
-// RUN: %clangxx_asan -m64 -O1 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-64 < %t.out
-// RUN: %clangxx_asan -m64 -O2 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-64 < %t.out
-// RUN: %clangxx_asan -m32 -O0 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-32 < %t.out
-// RUN: %clangxx_asan -m32 -O1 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-32 < %t.out
-// RUN: %clangxx_asan -m32 -O2 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-32 < %t.out
-
-// Zero-base shadow only works on x86_64 and i386.
-// REQUIRES: x86_64-supported-target,i386-supported-target
-
-#include <string.h>
-int main(int argc, char **argv) {
-  char x[10];
-  memset(x, 0, 10);
-  int res = x[argc * 10];  // BOOOM
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*zero-base-shadow.cc:}}[[@LINE-2]]
-  // CHECK: {{Address 0x.* is .* frame}}
-  // CHECK: main
-
-  // Check that shadow for stack memory occupies lower part of address space.
-  // CHECK-64: =>0x0f
-  // CHECK-32: =>0x1
-  return res;
-}
diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc
new file mode 100644 (file)
index 0000000..5406b8a
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %clangxx_asan -O0 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
+
+// Zero-base shadow only works on x86_64 and i386.
+// REQUIRES: i386-supported-target, asan-32-bits
+
+#include <string.h>
+int main(int argc, char **argv) {
+  char x[10];
+  memset(x, 0, 10);
+  int res = x[argc * 10];  // BOOOM
+  // CHECK: {{READ of size 1 at 0x.* thread T0}}
+  // CHECK: {{    #0 0x.* in _?main .*zero-base-shadow32.cc:}}[[@LINE-2]]
+  // CHECK: {{Address 0x.* is .* frame}}
+  // CHECK: main
+
+  // Check that shadow for stack memory occupies lower part of address space.
+  // CHECK: =>0x1
+  return res;
+}
diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc
new file mode 100644 (file)
index 0000000..c02c923
--- /dev/null
@@ -0,0 +1,24 @@
+// RUN: %clangxx_asan -O0 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 -fsanitize-address-zero-base-shadow -fPIE -pie %s -o %t
+// RUN: %t 2>&1 | %symbolize | FileCheck %s
+
+// Zero-base shadow only works on x86_64 and i386.
+// REQUIRES: x86_64-supported-target, asan-64-bits
+
+#include <string.h>
+int main(int argc, char **argv) {
+  char x[10];
+  memset(x, 0, 10);
+  int res = x[argc * 10];  // BOOOM
+  // CHECK: {{READ of size 1 at 0x.* thread T0}}
+  // CHECK: {{    #0 0x.* in _?main .*zero-base-shadow64.cc:}}[[@LINE-2]]
+  // CHECK: {{Address 0x.* is .* frame}}
+  // CHECK: main
+
+  // Check that shadow for stack memory occupies lower part of address space.
+  // CHECK: =>0x0f
+  return res;
+}
index f8aed0d4ca80b464336c3c98b7c2f35ec01f074c..a10af8611e4d4ccd6e4eaf65958b6e3a72648721 100644 (file)
@@ -1,10 +1,8 @@
 // Regression test for
 // https://code.google.com/p/address-sanitizer/issues/detail?id=180
 
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s
 
 #include <signal.h>
 #include <stdio.h>
index 6cfc1500c503b60a011491fa37d15aa12a4a0a6d..5e6d4c897e0014c9aa3b467c76dc3822b065dcea 100644 (file)
@@ -3,21 +3,13 @@
 // RUN: echo "fun:*brokenFunction*" > %tmp
 // RUN: echo "global:*badGlobal*" >> %tmp
 // RUN: echo "src:*blacklist-extra.cc" >> %tmp
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O0 %s -o %t \
+// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O0 %s -o %t \
 // RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O1 %s -o %t \
+// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O1 %s -o %t \
 // RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O2 %s -o %t \
+// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O2 %s -o %t \
 // RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O3 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O0 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O1 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O2 %s -o %t \
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O3 %s -o %t \
+// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -O3 %s -o %t \
 // RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1
 
 // badGlobal is accessed improperly, but we blacklisted it.
index 7b32798fefccce42fdcbb1eb7c404eeca2ba4803..536cddb15d9a6f7eba81e3240cbd1f461a36d5d7 100644 (file)
@@ -1,12 +1,7 @@
 // Check that we can store lots of stack frames if asked to.
 
-// RUN: %clangxx_asan -m64 -O0 %s -o %t 2>&1
-// RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 %t 2>&1 | \
-// RUN: %symbolize | FileCheck %s
-
-// RUN: %clangxx_asan -m32 -O0 %s -o %t 2>&1
-// RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 %t 2>&1 | \
-// RUN: %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t 2>&1
+// RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 %t 2>&1 | %symbolize | FileCheck %s
 #include <stdlib.h>
 #include <stdio.h>
 
index 6aa15e81f6ec0a8c09ecd09f7bdab7c9ce139ba4..87d8886c054797c16415a1770c9c493f1f0005f4 100644 (file)
@@ -1,11 +1,7 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 // CHECK: AddressSanitizer: global-buffer-overflow
 int global[10];
index 781508d616162df32cec8a93e9c400e728e38040..ecc6fffc9062d6bcf99dd84d9f263104255c6e59 100644 (file)
@@ -1,11 +1,7 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <pthread.h>
 
index b15895bf35791c984b218e3aca22d21fb280d190..03ed160161168b0227a13314a29b6bfd057678af 100644 (file)
 // It works on i368/x86_64 Linux, but not necessary anywhere else.
 // REQUIRES: x86_64-supported-target,i386-supported-target
 
-// RUN: %clangxx_asan -m64 -O0 %p/SharedLibs/dlclose-test-so.cc \
+// RUN: %clangxx_asan -O0 %p/SharedLibs/dlclose-test-so.cc \
 // RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %p/SharedLibs/dlclose-test-so.cc \
+// 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 -m64 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %p/SharedLibs/dlclose-test-so.cc \
+// 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 -m64 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %p/SharedLibs/dlclose-test-so.cc \
+// 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 -m64 -O3 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %p/SharedLibs/dlclose-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | FileCheck %s
 
 #include <assert.h>
 #include <dlfcn.h>
index 9e201117c563f0da2b8aae89b23ef65bf419c53f..6e6f4bbdc984a6e02ba196ebe4aa133dfe8ff8d5 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <stdlib.h>
 #include <string.h>
index 955ce38156fb41707d321f3a33adbbb990ca8103..775a66dfe2fec3676dc34c63037e8ce5fe07bc7d 100644 (file)
@@ -1,7 +1,7 @@
 // This test checks that we are no instrumenting a memory access twice
 // (before and after inlining)
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t
+// RUN: %clangxx_asan -O1 %s -o %t && %t
+// RUN: %clangxx_asan -O0 %s -o %t && %t
 __attribute__((always_inline))
 void foo(int *x) {
   *x = 0;
index 5696a38a7705d30a73939609429f284c1489bbc1..75001ae4192b134df2a76dea9461248e19db661d 100644 (file)
@@ -1,5 +1,5 @@
 // Don't run through %symbolize to avoid c++filt demangling.
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s
 
 namespace XXX {
 class YYY {
index 6a2f12e106feb3db253aa04b1b1a53fd17c4b289..e5723355156a1f4cdd83482d44e2aa0493a0d909 100644 (file)
@@ -1,11 +1,7 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <string.h>
 int main(int argc, char **argv) {
index f1d719cd0b20a41c095a9030763bc7f77050feda..664b2646d7794cb77c488171d78e5aac6bc98472 100644 (file)
@@ -1,18 +1,10 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
 
 #include <stdlib.h>
@@ -27,10 +19,10 @@ int main(int argc, char **argv) {
   // CHECK: {{allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*heap-overflow.cc:21}}
+  // CHECK-Linux: {{    #1 0x.* in main .*heap-overflow.cc:13}}
 
   // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*heap-overflow.cc:21}}
+  // CHECK-Darwin: {{    #1 0x.* in _?main .*heap-overflow.cc:13}}
   free(x);
   return res;
 }
index a09e3bf87d6059ec20d7643113a94dee060b8bb1..52def29b63c9969fdd1e1d9823bacb8cad12baee 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clangxx_asan -m64  %s -o %t && %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -m64 -O %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O %s -o %t && %t 2>&1 | FileCheck %s
 // Check that we can find huge buffer overflows to the left.
 #include <stdlib.h>
 #include <string.h>
index 45f4f17c0cb0f9d5478e32329b084b9278a8e501..9ed79a715ac4742990959af2f6de896fa9b2dc64 100644 (file)
@@ -4,7 +4,7 @@
 // (3) destructor of A reads uninitialized global C from another module.
 // We do *not* want to report init-order bug in this case.
 
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t
+// RUN: %clangxx_asan -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 | FileCheck %s
 
 #include <stdio.h>
index 228f44204c996b1a8e7e71ce8b0e28ff3c685c1d..001fa8a9a24e8453c161c55e667d5090146b1530 100644 (file)
@@ -1,13 +1,13 @@
 // Regression test for
 // https://code.google.com/p/address-sanitizer/issues/detail?id=178
 
-// RUN: %clangxx_asan -m64 -O0 %p/SharedLibs/init-order-dlopen-so.cc \
+// RUN: %clangxx_asan -O0 %p/SharedLibs/init-order-dlopen-so.cc \
 // RUN:     -fPIC -shared -o %t-so.so
 // 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 -m64 -O0 %s -o %t -Wl,--export-dynamic || \
-// RUN:     %clangxx_asan -m64 -O0 %s -o %t
+// RUN: %clangxx_asan -O0 %s -o %t -Wl,--export-dynamic || \
+// RUN:     %clangxx_asan -O0 %s -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 | FileCheck %s
 #include <dlfcn.h>
 #include <pthread.h>
index 12fbc49ed91b86b8bdb3cfcebd5beb212d21d7be..f40fcc082f9adabb399438f5a64e567a83cdfd32 100644 (file)
@@ -1,31 +1,16 @@
 // Test for blacklist functionality of initialization-order checker.
 
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-blacklist-extra.cc\
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-blacklist-extra.cc\
 // RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
 // RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
 // RUN:   -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O1 %s %p/Helpers/initialization-blacklist-extra.cc\
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-blacklist-extra.cc\
 // RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
 // RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
 // RUN:   -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O2 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
-// RUN:   -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
-// RUN:   -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O1 %s %p/Helpers/initialization-blacklist-extra.cc\
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
-// RUN:   -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O2 %s %p/Helpers/initialization-blacklist-extra.cc\
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-blacklist-extra.cc\
 // RUN:   %p/Helpers/initialization-blacklist-extra2.cc \
 // RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \
 // RUN:   -fsanitize=init-order -o %t
index ee2c725f0b13ba4e5a4c1565f7952bcd2ccf7041..91fe7dbd4b6434b2e9f2fbcd0a434f39cbec6a61 100644 (file)
@@ -1,11 +1,7 @@
 // Test to make sure basic initialization order errors are caught.
 
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 \
-// RUN:    | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 \
-// RUN:     | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t
+// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 | %symbolize | FileCheck %s
 
 // Do not test with optimization -- the error may be optimized away.
 
index ba5410674f76c62dd3ca93e7e9a99e918d92647a..65c95edd5081a9a3104698d9a442bc415cf76a27 100644 (file)
@@ -4,28 +4,16 @@
 // constructor implies that it was initialized during constant initialization,
 // not dynamic initialization).
 
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-constexpr-extra.cc\
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cc\
 // RUN:   --std=c++11 -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O1 %s %p/Helpers/initialization-constexpr-extra.cc\
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cc\
 // RUN:   --std=c++11 -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O2 %s %p/Helpers/initialization-constexpr-extra.cc\
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cc\
 // RUN:   --std=c++11 -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O3 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O1 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O2 %s %p/Helpers/initialization-constexpr-extra.cc\
-// RUN:   --std=c++11 -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O3 %s %p/Helpers/initialization-constexpr-extra.cc\
+// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cc\
 // RUN:   --std=c++11 -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
 
index 407226e29a1b08f72a2bd97d3c232a651e0d9031..ed37d137f8cbd4ffd4d47fe9131e06c0db15eb97 100644 (file)
@@ -1,21 +1,13 @@
 // A collection of various initializers which shouldn't trip up initialization
 // order checking.  If successful, this will just return 0.
 
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O1 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O2 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m64 -O3 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O1 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O2 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
-// RUN: %clangxx_asan -m32 -O3 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
+// RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t
 // RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1
 
 // Simple access:
index 428a109fe70dec7e9d2d4c2d4112b0585277322e..b78f80160d896693ad1645b1e75cfb5c7a15f514 100644 (file)
@@ -1,5 +1,5 @@
 // Check that user may include ASan interface header.
-// RUN: %clang -fsanitize=address -I %p/../../../include %s -o %t && %t
+// RUN: %clang_asan -I %p/../../../include %s -o %t && %t
 // RUN: %clang -I %p/../../../include %s -o %t && %t
 #include <sanitizer/asan_interface.h>
 
index 0ef064056b632761355da28ee5b06fff1732c1a2..c17441318880535d862364231f678eeff5252917 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <stdlib.h>
 #include <string.h>
index ceecc29b7b0a935dc59be6b0d339a4a1c689c29b..d550a969e8b4257dfa494ddbe4781a143d3ea470 100644 (file)
@@ -1,18 +1,10 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
 
 #include <stdlib.h>
index c23516b3329925953070a0bcddce159e60d54838..57f50d1438b79119e357ecf2e45a9ea7fa3d0e97 100644 (file)
@@ -1,5 +1,5 @@
 // Check that we fill malloc-ed memory correctly.
-// RUN: %clangxx_asan -m64 %s -o %t
+// RUN: %clangxx_asan %s -o %t
 // RUN: %t | FileCheck %s
 // RUN: ASAN_OPTIONS=max_malloc_fill_size=10:malloc_fill_byte=8 %t | FileCheck %s --check-prefix=CHECK-10-8
 // RUN: ASAN_OPTIONS=max_malloc_fill_size=20:malloc_fill_byte=171 %t | FileCheck %s --check-prefix=CHECK-20-ab
index 00bf921c744a79d21ca572417bf7ba9eb1c429ad..881410e261a424331ed065a3f15eeb8b66e508fa 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=0 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-nonstrict
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=1 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-strict
+// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=0 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-nonstrict
+// RUN: %clangxx_asan -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=1 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-strict
 // Default to strict_memcmp=1.
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-strict
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-strict
 
 #include <stdio.h>
 #include <string.h>
index ac3f7f32ea75aa24379aa74f4777df3a29319130..78c151f044349b2f07c6dd36537232d3aa547b8d 100644 (file)
@@ -1,11 +1,7 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <string.h>
 int main(int argc, char **argv) {
index 60a521d1c210dbb917a73dbd249a779582966547..a5374f5c28cf76e653fefc4a385a1c1946a915dd 100644 (file)
@@ -1,18 +1,10 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
 
 __attribute__((noinline))
index c579262726f948cb61b8dcbb165972a3eefb66f7..43c14537e4b3adbccc3041f2a6fdde041f4f1ae0 100644 (file)
@@ -1,11 +1,7 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <stdlib.h>
 int main(int argc, char **argv) {
index 3d830653e33e2104224105cdfaec6c8906a75abb..ac4f034a8fe2a77387c97f36ca94be8725806f68 100644 (file)
@@ -1,9 +1,9 @@
 // Sanity checking a test in pure C.
-// RUN: %clang -g -fsanitize=address -O2 %s -o %t
+// RUN: %clang_asan -O2 %s -o %t
 // RUN: %t 2>&1 | %symbolize | FileCheck %s
 
 // Sanity checking a test in pure C with -pie.
-// RUN: %clang -g -fsanitize=address -O2 %s -pie -o %t
+// RUN: %clang_asan -O2 %s -pie -o %t
 // RUN: %t 2>&1 | %symbolize | FileCheck %s
 
 #include <stdlib.h>
index 05bf3ecdf4f9700d0823dbabd016cdd6fa755b1c..205143d8249e585336a2461f513cb9b388a41e2d 100644 (file)
@@ -1,27 +1,15 @@
-// RUN: %clangxx_asan -m64 -O0 %p/SharedLibs/shared-lib-test-so.cc \
+// RUN: %clangxx_asan -O0 %p/SharedLibs/shared-lib-test-so.cc \
 // RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %p/SharedLibs/shared-lib-test-so.cc \
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 %p/SharedLibs/shared-lib-test-so.cc \
 // RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %p/SharedLibs/shared-lib-test-so.cc \
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 %p/SharedLibs/shared-lib-test-so.cc \
 // RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %p/SharedLibs/shared-lib-test-so.cc \
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %p/SharedLibs/shared-lib-test-so.cc \
 // RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %p/SharedLibs/shared-lib-test-so.cc \
-// RUN:     -fPIC -shared -o %t-so.so
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <dlfcn.h>
 #include <stdio.h>
index df9eba276039901ab6c7bf4b92f94c1e3c2e986d..31ee50b57ef79e98a4af5af71c8286c1826eaff8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang -g -fsanitize=address -O2 %s -o %t
+// RUN: %clang_asan -O2 %s -o %t
 // RUN: ASAN_OPTIONS="sleep_before_dying=1" %t 2>&1 | FileCheck %s
 
 #include <stdlib.h>
index bb8de16b2b8a529ee793b61a1307c347b17faca4..a4afe5d28c9ddbe814a60480bbbcb1038d6f9cce 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <string.h>
 
index 0395522252e83e8f0c49adcd189b0963a667f8ee..a4acd592af75bd03f91e815acc245fd63d8adae7 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O1 %s -o %t
+// RUN: %clangxx_asan -O1 %s -o %t
 // RUN: %t 0 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK0
 // RUN: %t 1 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK1
 // RUN: %t 2 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK2
index 25ea43af48a48bb3eca08ddeb4ea3ebf267777bf..371948253902dda337f411a8bba59c019108a28a 100644 (file)
@@ -1,11 +1,7 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 #include <string.h>
 int main(int argc, char **argv) {
index f8d8a1a2ae392039352bbe1a39ee224a7757d9dd..11bdfdf7c868e679257a2d9e1d0a23e2427f6dea 100644 (file)
@@ -1,19 +1,11 @@
 // XFAIL: *
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O0 %s -o %t && \
+// RUN: %clangxx_asan -fsanitize=use-after-return -O0 %s -o %t && \
 // RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O1 %s -o %t && \
+// RUN: %clangxx_asan -fsanitize=use-after-return -O1 %s -o %t && \
 // RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O2 %s -o %t && \
+// RUN: %clangxx_asan -fsanitize=use-after-return -O2 %s -o %t && \
 // RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O3 %s -o %t && \
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O0 %s -o %t && \
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O1 %s -o %t && \
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O2 %s -o %t && \
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O3 %s -o %t && \
+// RUN: %clangxx_asan -fsanitize=use-after-return -O3 %s -o %t && \
 // RUN:   %t 2>&1 | %symbolize | FileCheck %s
 
 #include <stdio.h>
index ef7bf98ab3c206eb65035001641700dcc020ad3d..fbfa9615baf210160eee7598f5f2567457436551 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang -g -fsanitize=address -O2 %s -o %t
+// RUN: %clang_asan -O2 %s -o %t
 // RUN: ASAN_OPTIONS="strip_path_prefix='/'" %t 2>&1 | FileCheck %s
 
 #include <stdlib.h>
index 5133b5c1653e2d800337360f38486d3fbc322ccc..91dbec488b66a0ccfc5f4813ccca19fd79122f8b 100644 (file)
@@ -1,18 +1,10 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
 
 #include <string.h>
index f5f2ad62b815d771fba06046cc02c10f513834cc..a0de68b03e38fefeb05651cef055411e65c4890a 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 // Test the time() interceptor.
 
index b0de07b04a0897fb101f168d1e0422f41bd20684..58c5e080b052ee7bdc6c95c5af4826a0268c9de0 100644 (file)
@@ -1,18 +1,10 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
 
 // Test use-after-free report in the case when access is at the right border of
@@ -26,21 +18,21 @@ int main() {
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{WRITE of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*use-after-free-right.cc:25}}
+  // CHECK: {{    #0 0x.* in _?main .*use-after-free-right.cc:17}}
   // CHECK: {{0x.* is located 0 bytes inside of 1-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*free}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:24}}
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:16}}
 
   // CHECK-Darwin: {{    #0 0x.* in _?wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:24}}
+  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:16}}
 
   // CHECK: {{previously allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:23}}
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:15}}
 
   // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:23}}
+  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:15}}
 }
index aee185dc45182fd3f9fac0bb1faae17981bcdf91..54af66d8a4e2ae9f9039b67664b120f4f2994769 100644 (file)
@@ -1,18 +1,10 @@
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
+// RUN: %clangxx_asan -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out
 // RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out
 
 #include <stdlib.h>
@@ -23,21 +15,21 @@ int main() {
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*use-after-free.cc:22}}
+  // CHECK: {{    #0 0x.* in _?main .*use-after-free.cc:14}}
   // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*free}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:21}}
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:13}}
 
   // CHECK-Darwin: {{    #0 0x.* in _?wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:21}}
+  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:13}}
 
   // CHECK: {{previously allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:20}}
+  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:12}}
 
   // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:20}}
+  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:12}}
 }
index d87342900245ea047338ae8493ec88d747bee53d..03a241764d487331554c5f8dadac71ffbb1b2a97 100644 (file)
@@ -1,5 +1,5 @@
 // Check that __asan_poison_memory_region works.
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 //
 // Check that we can disable it
 // RUN: ASAN_OPTIONS=allow_user_poisoning=0 %t
index 15e1fce81e5487f4fd7da20fd252e0e4673341da..8c5bd3a9358737d5237a856c86b4202d5ebf403e 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \
+// RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \
 // RUN:     %t 2>&1 | %symbolize | FileCheck %s
 #include <stdio.h>
 
index 5c121ea187eb12635fee58f013f8a61302070692..37f92e59c1a0bdc5a43dbb334a423a8915073c98 100644 (file)
@@ -2,10 +2,7 @@
 // happens. "always_inline" is not enough, as Clang doesn't emit
 // llvm.lifetime intrinsics at -O0.
 //
-// RUN: %clangxx_asan -m64 -O2 -fsanitize=use-after-scope %s -o %t && \
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -m32 -O2 -fsanitize=use-after-scope %s -o %t && \
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O2 -fsanitize=use-after-scope %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 int *arr;
 
index 56a2756011c9f0f000a8f85a307161bf19d90943..c23acf76eaeefd9aa2adb00ce2a6f37ea1ec99f6 100644 (file)
@@ -1,5 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && %t
 
 #include <stdio.h>
 
@@ -11,6 +10,5 @@ int main() {
     p = &x;
   }
   printf("PASSED\n");
-  // CHECK: PASSED
   return 0;
 }
index 3575188bd8ceb8a0878d9622ca76896011c59193..4b1d6f02ce1ea38cca8cba348ca2aead4b3bffb8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \
+// RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \
 // RUN:     %t 2>&1 | %symbolize | FileCheck %s
 //
 // Lifetime for temporaries is not emitted yet.
index a19f20fe129f7f88e3aecd527245dca691946ebd..5a74fda78be74a1d6b04274592c83a178998d750 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \
+// RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && \
 // RUN:     %t 2>&1 | %symbolize | FileCheck %s
 
 int main() {
index 88fbb17176fade3e0cf33de997dbabdc7a9ed0d9..154df56e0f389469772f1f6f6f43b86625731ffc 100644 (file)
@@ -1,37 +1,23 @@
-// RUN: %clangxx_asan -DWAIT -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
-// RUN: %clangxx_asan -DWAITPID -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAITPID -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAITPID -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAITPID -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAITPID -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAITPID -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
-// RUN: %clangxx_asan -DWAITID -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAITID -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAITID -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAITID -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAITID -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAITID -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
-// RUN: %clangxx_asan -DWAIT3 -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3 -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3 -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3 -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT3 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT3 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
-// RUN: %clangxx_asan -DWAIT4 -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4 -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4 -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4 -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT4 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT4 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT3_RUSAGE -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT3_RUSAGE -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT4_RUSAGE -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
+// RUN: %clangxx_asan -DWAIT4_RUSAGE -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s
 
 
 #include <assert.h>
index 5100a2848b360f4d8f4ca6f9f0d58f40ba92e1c2..6722e96ed701adbd0046c57596b05dd338c59b22 100644 (file)
@@ -50,12 +50,19 @@ if llvm_src_root is None:
 
 # Setup default compiler flags used with -fsanitize=address option.
 # FIXME: Review the set of required flags and check if it can be reduced.
-clang_asan_cxxflags = ("-ccc-cxx "
-                      + "-fsanitize=address "
-                      + "-mno-omit-leaf-frame-pointer "
-                      + "-fno-omit-frame-pointer "
-                      + "-fno-optimize-sibling-calls "
-                      + "-g")
+bits_cflag = " -m" + config.bits
+clang_asan_cflags = (" -fsanitize=address"
+                   + " -mno-omit-leaf-frame-pointer"
+                   + " -fno-omit-frame-pointer"
+                   + " -fno-optimize-sibling-calls"
+                   + " -g"
+                   + bits_cflag)
+clang_asan_cxxflags = " -ccc-cxx" + clang_asan_cflags
+config.substitutions.append( ("%clang ", " " + config.clang + bits_cflag + " "))
+config.substitutions.append( ("%clangxx ", (" " + config.clang + " -ccc-cxx" +
+                                            bits_cflag + " ")) )
+config.substitutions.append( ("%clang_asan ", (" " + config.clang + " " +
+                                              clang_asan_cflags + " ")) )
 config.substitutions.append( ("%clangxx_asan ", (" " + config.clang + " " +
                                                 clang_asan_cxxflags + " ")) )
 
@@ -81,6 +88,8 @@ config.substitutions.append( ("%symbolize ", (" " + symbolizer +
 # Define CHECK-%os to check for OS-dependent output.
 config.substitutions.append( ('CHECK-%os', ("CHECK-" + config.host_os)))
 
+config.available_features.add("asan-" + config.bits + "-bits")
+
 # Default test suffixes.
 config.suffixes = ['.c', '.cc', '.cpp']
 
diff --git a/compiler-rt/lib/asan/lit_tests/lit.site.cfg.in b/compiler-rt/lib/asan/lit_tests/lit.site.cfg.in
deleted file mode 100644 (file)
index db52002..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-## Autogenerated by LLVM/Clang configuration.
-# Do not edit!
-
-# Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
-
-# Tool-specific config options.
-config.asan_source_dir = "@ASAN_SOURCE_DIR@"
-
-# Load tool-specific config that would do the real work.
-lit.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/lit.cfg")
index 9c5ffd62304b5b861c7e12d88307f70751b2fe16..dd67295e9428c76d3488ea948e7490f8c2a598ce 100644 (file)
@@ -40,11 +40,6 @@ if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)):
 path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
 config.environment['PATH'] = path
 
-# Define %clang and %clangxx substitutions to use in test RUN lines.
-config.substitutions.append( ("%clang ", (" " + config.clang + " ")) )
-config.substitutions.append( ("%clangxx ", (" " + config.clang +
-                              " -ccc-cxx ")) )
-
 # Use ugly construction to explicitly prohibit "clang", "clang++" etc.
 # in RUN lines.
 config.substitutions.append(
index fbefdf2d5c365fd2688057d7b111cf4a77b8b72f..ace46a7adb3e8052538667530155ef104a765d57 100644 (file)
@@ -48,6 +48,9 @@ if llvm_src_root is None:
   lit.load_config(config, ubsan_site_cfg)
   raise SystemExit
 
+# Define %clang substitution to use in test RUN lines.
+config.substitutions.append( ("%clang ", (" " + config.clang + " ")) )
+
 # Default test suffixes.
 config.suffixes = ['.c', '.cc', '.cpp']