<div dir="ltr">Is there a reason for this change other than to maintain consistency with LSan?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 6, 2013 at 1:23 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: samsonov<br>
Date: Thu Jun  6 04:23:34 2013<br>
New Revision: 183395<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=183395&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=183395&view=rev</a><br>
Log:<br>
[ASan] move all lit_tests under TestCases<br>
<br>
Added:<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Darwin/<br>
      - copied from r183386, compiler-rt/trunk/lib/asan/lit_tests/Darwin/<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Helpers/<br>
      - copied from r183386, compiler-rt/trunk/lib/asan/lit_tests/Helpers/<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/<br>
      - copied from r183386, compiler-rt/trunk/lib/asan/lit_tests/Linux/<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/SharedLibs/<br>
      - copied from r183386, compiler-rt/trunk/lib/asan/lit_tests/SharedLibs/<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/allow_user_segv.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/allow_user_segv.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/blacklist.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/blacklist.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_stack_uaf.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_tail_call.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_thread_stack.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/default_blacklist.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/default_blacklist.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/default_options.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/default_options.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/dlclose-test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/double-free.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/double-free.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/force_inline_opt0.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/free_hook_realloc.cc<br>
      - copied unchanged from r183387, compiler-rt/trunk/lib/asan/lit_tests/free_hook_realloc.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/global-demangle.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/global-demangle.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/global-overflow.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/huge_negative_hea_oob.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/init-order-atexit.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/init-order-atexit.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/init-order-dlopen.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/init-order-dlopen.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/initialization-blacklist.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/initialization-blacklist.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/initialization-bug.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/initialization-constexpr.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/initialization-constexpr.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/initialization-nobug.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/initialization-nobug.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/interface_test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/interface_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/invalid-free.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/invalid-free.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/large_func_test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/log-path_test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/log-path_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/log_path_fork_test.cc.disabled<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/log_path_fork_test.cc.disabled<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/malloc_fill.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/malloc_fill.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/malloc_hook.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/malloc_hook.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/memcmp_strict_test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/memcmp_strict_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/memcmp_test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/null_deref.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/on_error_callback.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/on_error_callback.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/partial_right.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/partial_right.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/sanity_check_pure_c.c<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/shared-lib-test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/sleep_before_dying.c<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/sleep_before_dying.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-frame-demangle.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-oob-frames.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/stack-oob-frames.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-overflow.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-use-after-return.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/strip_path_prefix.c<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/strip_path_prefix.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/strncpy-overflow.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/symbolize_callback.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/symbolize_callback.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/throw_call_test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/throw_call_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/throw_invoke_test.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/throw_invoke_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/time_interceptor.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/time_interceptor.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/unaligned_loads_and_stores.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/unaligned_loads_and_stores.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free-right.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/use-after-free-right.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-poison.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/use-after-poison.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-dtor-order.cc<br>
      - copied unchanged from r183391, compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-dtor-order.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-inlined.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-nobug.cc<br>
      - copied unchanged from r183391, compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-nobug.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc<br>
      - copied unchanged from r183391, compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-temp.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope.cc<br>
      - copied unchanged from r183391, compiler-rt/trunk/lib/asan/lit_tests/use-after-scope.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/wait.cc<br>
      - copied unchanged from r183386, compiler-rt/trunk/lib/asan/lit_tests/wait.cc<br>
Removed:<br>
    compiler-rt/trunk/lib/asan/lit_tests/Darwin/<br>
    compiler-rt/trunk/lib/asan/lit_tests/Helpers/<br>
    compiler-rt/trunk/lib/asan/lit_tests/Linux/<br>
    compiler-rt/trunk/lib/asan/lit_tests/SharedLibs/<br>
    compiler-rt/trunk/lib/asan/lit_tests/allow_user_segv.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/blacklist.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/default_blacklist.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/default_options.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/double-free.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/free_hook_realloc.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/global-demangle.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/init-order-atexit.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/init-order-dlopen.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/initialization-blacklist.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/initialization-constexpr.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/initialization-nobug.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/interface_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/invalid-free.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/log-path_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/log_path_fork_test.cc.disabled<br>
    compiler-rt/trunk/lib/asan/lit_tests/malloc_fill.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/malloc_hook.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/memcmp_strict_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/on_error_callback.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/partial_right.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/sleep_before_dying.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/stack-oob-frames.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/strip_path_prefix.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/symbolize_callback.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/throw_call_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/throw_invoke_test.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/time_interceptor.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/unaligned_loads_and_stores.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-free-right.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-poison.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-dtor-order.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-inlined.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-nobug.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-temp.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/use-after-scope.cc<br>
    compiler-rt/trunk/lib/asan/lit_tests/wait.cc<br>
Modified:<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Darwin/interface_symbols_darwin.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/interface_symbols_linux.c<br>
    compiler-rt/trunk/lib/asan/lit_tests/lit.cfg<br>
    compiler-rt/trunk/lib/asan/lit_tests/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
<br>
Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/Darwin/interface_symbols_darwin.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/Darwin/interface_symbols_darwin.c?rev=183395&r1=183386&r2=183395&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/Darwin/interface_symbols_darwin.c?rev=183395&r1=183386&r2=183395&view=diff</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/Darwin/interface_symbols_darwin.c (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/Darwin/interface_symbols_darwin.c Thu Jun  6 04:23:34 2013<br>
@@ -16,7 +16,7 @@<br>
 // RUN:   | grep -v "__asan_default_options" \<br>
 // RUN:   | grep -v "__asan_on_error" > %t.symbols<br>
<br>
-// RUN: cat %p/../../asan_interface_internal.h \<br>
+// RUN: cat %p/../../../asan_interface_internal.h \<br>
 // RUN:    | sed "s/\/\/.*//" | sed "s/typedef.*//" \<br>
 // RUN:    | grep -v "OPTIONAL" \<br>
 // RUN:    | grep "__asan_.*(" | sed "s/.* __asan_/__asan_/;s/(.*//" \<br>
<br>
Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/interface_symbols_linux.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/interface_symbols_linux.c?rev=183395&r1=183386&r2=183395&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/interface_symbols_linux.c?rev=183395&r1=183386&r2=183395&view=diff</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/interface_symbols_linux.c (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/interface_symbols_linux.c Thu Jun  6 04:23:34 2013<br>
@@ -8,7 +8,7 @@<br>
 // RUN:    | grep -v "__asan_symbolize" \<br>
 // RUN:    | grep -v "__asan_default_options" \<br>
 // RUN:    | grep -v "__asan_on_error" > %t.symbols<br>
-// RUN: cat %p/../../asan_interface_internal.h \<br>
+// RUN: cat %p/../../../asan_interface_internal.h \<br>
 // RUN:    | sed "s/\/\/.*//" | sed "s/typedef.*//" \<br>
 // RUN:    | grep -v "OPTIONAL" \<br>
 // RUN:    | grep "__asan_.*(" | sed "s/.* __asan_/__asan_/;s/(.*//" \<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/allow_user_segv.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/allow_user_segv.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/allow_user_segv.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/allow_user_segv.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/allow_user_segv.cc (removed)<br>
@@ -1,50 +0,0 @@<br>
-// Regression test for<br>
-// <a href="https://code.google.com/p/address-sanitizer/issues/detail?id=180" target="_blank">https://code.google.com/p/address-sanitizer/issues/detail?id=180</a><br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && ASAN_OPTIONS=allow_user_segv_handler=true %t 2>&1 | FileCheck %s<br>
-<br>
-#include <signal.h><br>
-#include <stdio.h><br>
-<br>
-struct sigaction user_sigaction;<br>
-struct sigaction original_sigaction;<br>
-<br>
-void User_OnSIGSEGV(int signum, siginfo_t *siginfo, void *context) {<br>
-  fprintf(stderr, "User sigaction called\n");<br>
-  if (original_sigaction.sa_flags | SA_SIGINFO)<br>
-    original_sigaction.sa_sigaction(signum, siginfo, context);<br>
-  else<br>
-    original_sigaction.sa_handler(signum);<br>
-}<br>
-<br>
-int DoSEGV() {<br>
-  volatile int *x = 0;<br>
-  return *x;<br>
-}<br>
-<br>
-int main() {<br>
-  user_sigaction.sa_sigaction = User_OnSIGSEGV;<br>
-  user_sigaction.sa_flags = SA_SIGINFO;<br>
-#if defined(__APPLE__) && !defined(__LP64__)<br>
-  // On 32-bit Darwin KERN_PROTECTION_FAILURE (SIGBUS) is delivered.<br>
-  int signum = SIGBUS;<br>
-#else<br>
-  // On 64-bit Darwin KERN_INVALID_ADDRESS (SIGSEGV) is delivered.<br>
-  // On Linux SIGSEGV is delivered as well.<br>
-  int signum = SIGSEGV;<br>
-#endif<br>
-  if (sigaction(signum, &user_sigaction, &original_sigaction)) {<br>
-    perror("sigaction");<br>
-    return 1;<br>
-  }<br>
-  fprintf(stderr, "User sigaction installed\n");<br>
-  return DoSEGV();<br>
-}<br>
-<br>
-// CHECK: User sigaction installed<br>
-// CHECK-NEXT: User sigaction called<br>
-// CHECK-NEXT: ASAN:SIGSEGV<br>
-// CHECK: AddressSanitizer: SEGV on unknown address<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/blacklist.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/blacklist.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/blacklist.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/blacklist.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/blacklist.cc (removed)<br>
@@ -1,44 +0,0 @@<br>
-// Test the blacklist functionality of ASan<br>
-<br>
-// RUN: echo "fun:*brokenFunction*" > %tmp<br>
-// RUN: echo "global:*badGlobal*" >> %tmp<br>
-// RUN: echo "src:*blacklist-extra.cc" >> %tmp<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O0 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O1 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O2 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m64 -O3 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O0 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O1 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O2 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-// RUN: %clangxx_asan -fsanitize-blacklist=%tmp -m32 -O3 %s -o %t \<br>
-// RUN: %p/Helpers/blacklist-extra.cc && %t 2>&1<br>
-<br>
-// badGlobal is accessed improperly, but we blacklisted it.<br>
-int badGlobal;<br>
-int readBadGlobal() {<br>
-  return (&badGlobal)[1];<br>
-}<br>
-<br>
-// A function which is broken, but excluded in the blacklist.<br>
-int brokenFunction(int argc) {<br>
-  char x[10] = {0};<br>
-  return x[argc * 10];  // BOOM<br>
-}<br>
-<br>
-// This function is defined in Helpers/blacklist-extra.cc, a source file which<br>
-// is blacklisted by name<br>
-int externalBrokenFunction(int x);<br>
-<br>
-int main(int argc, char **argv) {<br>
-  brokenFunction(argc);<br>
-  int x = readBadGlobal();<br>
-  externalBrokenFunction(argc);<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/deep_stack_uaf.cc (removed)<br>
@@ -1,36 +0,0 @@<br>
-// Check that we can store lots of stack frames if asked to.<br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t 2>&1<br>
-// RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 %t 2>&1 | \<br>
-// RUN: %symbolize | FileCheck %s<br>
-<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t 2>&1<br>
-// RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 %t 2>&1 | \<br>
-// RUN: %symbolize | FileCheck %s<br>
-#include <stdlib.h><br>
-#include <stdio.h><br>
-<br>
-template <int depth><br>
-struct DeepFree {<br>
-  static void free(char *x) {<br>
-    DeepFree<depth - 1>::free(x);<br>
-  }<br>
-};<br>
-<br>
-template<><br>
-struct DeepFree<0> {<br>
-  static void free(char *x) {<br>
-    ::free(x);<br>
-  }<br>
-};<br>
-<br>
-int main() {<br>
-  char *x = (char*)malloc(10);<br>
-  // deep_free(x);<br>
-  DeepFree<200>::free(x);<br>
-  return x[5];<br>
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}<br>
-  // CHECK: DeepFree<36><br>
-  // CHECK: DeepFree<98><br>
-  // CHECK: DeepFree<115><br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/deep_tail_call.cc (removed)<br>
@@ -1,24 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// CHECK: AddressSanitizer: global-buffer-overflow<br>
-int global[10];<br>
-// CHECK: {{#0.*call4}}<br>
-void __attribute__((noinline)) call4(int i) { global[i+10]++; }<br>
-// CHECK: {{#1.*call3}}<br>
-void __attribute__((noinline)) call3(int i) { call4(i); }<br>
-// CHECK: {{#2.*call2}}<br>
-void __attribute__((noinline)) call2(int i) { call3(i); }<br>
-// CHECK: {{#3.*call1}}<br>
-void __attribute__((noinline)) call1(int i) { call2(i); }<br>
-// CHECK: {{#4.*main}}<br>
-int main(int argc, char **argv) {<br>
-  call1(argc);<br>
-  return global[0];<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/deep_thread_stack.cc (removed)<br>
@@ -1,61 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <pthread.h><br>
-<br>
-int *x;<br>
-<br>
-void *AllocThread(void *arg) {<br>
-  x = new int;<br>
-  *x = 42;<br>
-  return NULL;<br>
-}<br>
-<br>
-void *FreeThread(void *arg) {<br>
-  delete x;<br>
-  return NULL;<br>
-}<br>
-<br>
-void *AccessThread(void *arg) {<br>
-  *x = 43;  // BOOM<br>
-  return NULL;<br>
-}<br>
-<br>
-typedef void* (*callback_type)(void* arg);<br>
-<br>
-void *RunnerThread(void *function) {<br>
-  pthread_t thread;<br>
-  pthread_create(&thread, NULL, (callback_type)function, NULL);<br>
-  pthread_join(thread, NULL);<br>
-  return NULL;<br>
-}<br>
-<br>
-void RunThread(callback_type function) {<br>
-  pthread_t runner;<br>
-  pthread_create(&runner, NULL, RunnerThread, (void*)function);<br>
-  pthread_join(runner, NULL);<br>
-}<br>
-<br>
-int main(int argc, char *argv[]) {<br>
-  RunThread(AllocThread);<br>
-  RunThread(FreeThread);<br>
-  RunThread(AccessThread);<br>
-  return (x != 0);<br>
-}<br>
-<br>
-// CHECK: AddressSanitizer: heap-use-after-free<br>
-// CHECK: WRITE of size 4 at 0x{{.*}} thread T[[ACCESS_THREAD:[0-9]+]]<br>
-// CHECK: freed by thread T[[FREE_THREAD:[0-9]+]] here:<br>
-// CHECK: previously allocated by thread T[[ALLOC_THREAD:[0-9]+]] here:<br>
-// CHECK: Thread T[[ACCESS_THREAD]] created by T[[ACCESS_RUNNER:[0-9]+]] here:<br>
-// CHECK: Thread T[[ACCESS_RUNNER]] created by T0 here:<br>
-// CHECK: Thread T[[FREE_THREAD]] created by T[[FREE_RUNNER:[0-9]+]] here:<br>
-// CHECK: Thread T[[FREE_RUNNER]] created by T0 here:<br>
-// CHECK: Thread T[[ALLOC_THREAD]] created by T[[ALLOC_RUNNER:[0-9]+]] here:<br>
-// CHECK: Thread T[[ALLOC_RUNNER]] created by T0 here:<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/default_blacklist.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/default_blacklist.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/default_blacklist.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/default_blacklist.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/default_blacklist.cc (removed)<br>
@@ -1,3 +0,0 @@<br>
-// Test that ASan uses the default blacklist from resource directory.<br>
-// RUN: %clangxx_asan -### %s 2>&1 | FileCheck %s<br>
-// CHECK: fsanitize-blacklist={{.*}}asan_blacklist.txt<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/default_options.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/default_options.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/default_options.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/default_options.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/default_options.cc (removed)<br>
@@ -1,15 +0,0 @@<br>
-// RUN: %clangxx_asan -O2 %s -o %t<br>
-// RUN: %t 2>&1 | FileCheck %s<br>
-<br>
-const char *kAsanDefaultOptions="verbosity=1 foo=bar";<br>
-<br>
-extern "C"<br>
-__attribute__((no_sanitize_address))<br>
-const char *__asan_default_options() {<br>
-  // CHECK: Using the defaults from __asan_default_options: {{.*}} foo=bar<br>
-  return kAsanDefaultOptions;<br>
-}<br>
-<br>
-int main() {<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/dlclose-test.cc (removed)<br>
@@ -1,93 +0,0 @@<br>
-// Regression test for<br>
-// <a href="http://code.google.com/p/address-sanitizer/issues/detail?id=19" target="_blank">http://code.google.com/p/address-sanitizer/issues/detail?id=19</a><br>
-// Bug description:<br>
-// 1. application dlopens foo.so<br>
-// 2. asan registers all globals from foo.so<br>
-// 3. application dlcloses foo.so<br>
-// 4. application mmaps some memory to the location where foo.so was before<br>
-// 5. application starts using this mmaped memory, but asan still thinks there<br>
-// are globals.<br>
-// 6. BOOM<br>
-<br>
-// This sublte test assumes that after a foo.so is dlclose-d<br>
-// we can mmap the region of memory that has been occupied by the library.<br>
-// It works on i368/x86_64 Linux, but not necessary anywhere else.<br>
-// REQUIRES: x86_64-supported-target,i386-supported-target<br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %p/SharedLibs/dlclose-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | FileCheck %s<br>
-<br>
-#include <assert.h><br>
-#include <dlfcn.h><br>
-#include <stdio.h><br>
-#include <string.h><br>
-#include <sys/mman.h><br>
-#include <unistd.h><br>
-<br>
-#include <string><br>
-<br>
-using std::string;<br>
-<br>
-typedef int *(fun_t)();<br>
-<br>
-int main(int argc, char *argv[]) {<br>
-  string path = string(argv[0]) + "-so.so";<br>
-  size_t PageSize = sysconf(_SC_PAGESIZE);<br>
-  printf("opening %s ... \n", path.c_str());<br>
-  void *lib = dlopen(path.c_str(), RTLD_NOW);<br>
-  if (!lib) {<br>
-    printf("error in dlopen(): %s\n", dlerror());<br>
-    return 1;<br>
-  }<br>
-  fun_t *get = (fun_t*)dlsym(lib, "get_address_of_static_var");<br>
-  if (!get) {<br>
-    printf("failed dlsym\n");<br>
-    return 1;<br>
-  }<br>
-  int *addr = get();<br>
-  assert(((size_t)addr % 32) == 0);  // should be 32-byte aligned.<br>
-  printf("addr: %p\n", addr);<br>
-  addr[0] = 1;  // make sure we can write there.<br>
-<br>
-  // Now dlclose the shared library.<br>
-  printf("attempting to dlclose\n");<br>
-  if (dlclose(lib)) {<br>
-    printf("failed to dlclose\n");<br>
-    return 1;<br>
-  }<br>
-  // Now, the page where 'addr' is unmapped. Map it.<br>
-  size_t page_beg = ((size_t)addr) & ~(PageSize - 1);<br>
-  void *res = mmap((void*)(page_beg), PageSize,<br>
-                   PROT_READ | PROT_WRITE,<br>
-                   MAP_PRIVATE | MAP_ANON | MAP_FIXED | MAP_NORESERVE, 0, 0);<br>
-  if (res == (char*)-1L) {<br>
-    printf("failed to mmap\n");<br>
-    return 1;<br>
-  }<br>
-  addr[1] = 2;  // BOOM (if the bug is not fixed).<br>
-  printf("PASS\n");<br>
-  // CHECK: PASS<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/double-free.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/double-free.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/double-free.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/double-free.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/double-free.cc (removed)<br>
@@ -1,18 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <stdlib.h><br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  memset(x, 0, 10);<br>
-  int res = x[argc];<br>
-  free(x);<br>
-  free(x + argc - 1);  // BOOM<br>
-  // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0<br>
-  // CHECK: double-free.cc:[[@LINE-2]]<br>
-  // CHECK: freed by thread T0 here:<br>
-  // CHECK: double-free.cc:[[@LINE-5]]<br>
-  // CHECK: allocated by thread T0 here:<br>
-  // CHECK: double-free.cc:[[@LINE-10]]<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/force_inline_opt0.cc (removed)<br>
@@ -1,14 +0,0 @@<br>
-// This test checks that we are no instrumenting a memory access twice<br>
-// (before and after inlining)<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t<br>
-__attribute__((always_inline))<br>
-void foo(int *x) {<br>
-  *x = 0;<br>
-}<br>
-<br>
-int main() {<br>
-  int x;<br>
-  foo(&x);<br>
-  return x;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/free_hook_realloc.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/free_hook_realloc.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/free_hook_realloc.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/free_hook_realloc.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/free_hook_realloc.cc (removed)<br>
@@ -1,31 +0,0 @@<br>
-// Check that free hook doesn't conflict with Realloc.<br>
-// RUN: %clangxx_asan -O2 %s -o %t<br>
-// RUN: %t 2>&1 | FileCheck %s<br>
-#include <stdlib.h><br>
-#include <unistd.h><br>
-<br>
-static void *glob_ptr;<br>
-<br>
-extern "C" {<br>
-void __asan_free_hook(void *ptr) {<br>
-  if (ptr == glob_ptr) {<br>
-    *(int*)ptr = 0;<br>
-    write(1, "FreeHook\n", sizeof("FreeHook\n"));<br>
-  }<br>
-}<br>
-}<br>
-<br>
-int main() {<br>
-  int *x = (int*)malloc(100);<br>
-  x[0] = 42;<br>
-  glob_ptr = x;<br>
-  int *y = (int*)realloc(x, 200);<br>
-  // Verify that free hook was called and didn't spoil the memory.<br>
-  if (y[0] != 42) {<br>
-    _exit(1);<br>
-  }<br>
-  write(1, "Passed\n", sizeof("Passed\n"));<br>
-  // CHECK: FreeHook<br>
-  // CHECK: Passed<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/global-demangle.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/global-demangle.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/global-demangle.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/global-demangle.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/global-demangle.cc (removed)<br>
@@ -1,18 +0,0 @@<br>
-// Don't run through %symbolize to avoid c++filt demangling.<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | FileCheck %s<br>
-<br>
-namespace XXX {<br>
-class YYY {<br>
- public:<br>
-  static char ZZZ[];<br>
-};<br>
-char YYY::ZZZ[] = "abc";<br>
-}<br>
-<br>
-int main(int argc, char **argv) {<br>
-  return (int)XXX::YYY::ZZZ[argc + 5];  // BOOM<br>
-  // CHECK: {{READ of size 1 at 0x.*}}<br>
-  // CHECK: {{0x.* is located 2 bytes to the right of global variable}}<br>
-  // CHECK: 'XXX::YYY::ZZZ' {{.*}} of size 4<br>
-  // CHECK: 'XXX::YYY::ZZZ' is ascii string 'abc'<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/global-overflow.cc (removed)<br>
@@ -1,25 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  static char XXX[10];<br>
-  static char YYY[10];<br>
-  static char ZZZ[10];<br>
-  memset(XXX, 0, 10);<br>
-  memset(YYY, 0, 10);<br>
-  memset(ZZZ, 0, 10);<br>
-  int res = YYY[argc * 10];  // BOOOM<br>
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}<br>
-  // CHECK: {{    #0 0x.* in _?main .*global-overflow.cc:}}[[@LINE-2]]<br>
-  // CHECK: {{0x.* is located 0 bytes to the right of global variable}}<br>
-  // CHECK:   {{.*YYY.* of size 10}}<br>
-  res += XXX[argc] + ZZZ[argc];<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/heap-overflow.cc (removed)<br>
@@ -1,36 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-<br>
-#include <stdlib.h><br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  memset(x, 0, 10);<br>
-  int res = x[argc * 10];  // BOOOM<br>
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}<br>
-  // CHECK: {{    #0 0x.* in _?main .*heap-overflow.cc:}}[[@LINE-2]]<br>
-  // CHECK: {{0x.* is located 0 bytes to the right of 10-byte region}}<br>
-  // CHECK: {{allocated by thread T0 here:}}<br>
-<br>
-  // CHECK-Linux: {{    #0 0x.* in .*malloc}}<br>
-  // CHECK-Linux: {{    #1 0x.* in main .*heap-overflow.cc:21}}<br>
-<br>
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}<br>
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*heap-overflow.cc:21}}<br>
-  free(x);<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/huge_negative_hea_oob.cc (removed)<br>
@@ -1,13 +0,0 @@<br>
-// RUN: %clangxx_asan -m64  %s -o %t && %t 2>&1 | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O %s -o %t && %t 2>&1 | FileCheck %s<br>
-// Check that we can find huge buffer overflows to the left.<br>
-#include <stdlib.h><br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  char *x = (char*)malloc(1 << 20);<br>
-  memset(x, 0, 10);<br>
-  int res = x[-argc * 4000];  // BOOOM<br>
-  // CHECK: is located 4000 bytes to the left of<br>
-  free(x);<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/init-order-atexit.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/init-order-atexit.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/init-order-atexit.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/init-order-atexit.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/init-order-atexit.cc (removed)<br>
@@ -1,31 +0,0 @@<br>
-// Test for the following situation:<br>
-// (1) global A is constructed.<br>
-// (2) exit() is called during construction of global B.<br>
-// (3) destructor of A reads uninitialized global C from another module.<br>
-// We do *not* want to report init-order bug in this case.<br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/init-order-atexit-extra.cc -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 | FileCheck %s<br>
-<br>
-#include <stdio.h><br>
-#include <stdlib.h><br>
-<br>
-void AccessC();<br>
-<br>
-class A {<br>
- public:<br>
-  A() { }<br>
-  ~A() { AccessC(); printf("PASSED\n"); }<br>
-  // CHECK-NOT: AddressSanitizer<br>
-  // CHECK: PASSED<br>
-};<br>
-<br>
-A a;<br>
-<br>
-class B {<br>
- public:<br>
-  B() { exit(1); }<br>
-  ~B() { }<br>
-};<br>
-<br>
-B b;<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/init-order-dlopen.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/init-order-dlopen.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/init-order-dlopen.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/init-order-dlopen.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/init-order-dlopen.cc (removed)<br>
@@ -1,52 +0,0 @@<br>
-// Regression test for<br>
-// <a href="https://code.google.com/p/address-sanitizer/issues/detail?id=178" target="_blank">https://code.google.com/p/address-sanitizer/issues/detail?id=178</a><br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %p/SharedLibs/init-order-dlopen-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// If the linker doesn't support --export-dynamic (which is ELF-specific),<br>
-// try to link without that option.<br>
-// FIXME: find a better solution.<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t -Wl,--export-dynamic || \<br>
-// RUN:     %clangxx_asan -m64 -O0 %s -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 | FileCheck %s<br>
-#include <dlfcn.h><br>
-#include <pthread.h><br>
-#include <stdio.h><br>
-#include <unistd.h><br>
-<br>
-#include <string><br>
-<br>
-using std::string;<br>
-<br>
-int foo() {<br>
-  return 42;<br>
-}<br>
-int global = foo();<br>
-<br>
-__attribute__((visibility("default")))<br>
-void inc_global() {<br>
-  global++;<br>
-}<br>
-<br>
-void *global_poller(void *arg) {<br>
-  while (true) {<br>
-    if (global != 42)<br>
-      break;<br>
-    usleep(100);<br>
-  }<br>
-  return 0;<br>
-}<br>
-<br>
-int main(int argc, char *argv[]) {<br>
-  pthread_t p;<br>
-  pthread_create(&p, 0, global_poller, 0);<br>
-  string path = string(argv[0]) + "-so.so";<br>
-  if (0 == dlopen(path.c_str(), RTLD_NOW)) {<br>
-    fprintf(stderr, "dlerror: %s\n", dlerror());<br>
-    return 1;<br>
-  }<br>
-  pthread_join(p, 0);<br>
-  printf("PASSED\n");<br>
-  // CHECK: PASSED<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/initialization-blacklist.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-blacklist.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-blacklist.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/initialization-blacklist.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/initialization-blacklist.cc (removed)<br>
@@ -1,47 +0,0 @@<br>
-// Test for blacklist functionality of initialization-order checker.<br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-blacklist-extra.cc\<br>
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \<br>
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \<br>
-// RUN:   -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O1 %s %p/Helpers/initialization-blacklist-extra.cc\<br>
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \<br>
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \<br>
-// RUN:   -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O2 %s %p/Helpers/initialization-blacklist-extra.cc\<br>
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \<br>
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \<br>
-// RUN:   -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-blacklist-extra.cc\<br>
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \<br>
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \<br>
-// RUN:   -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O1 %s %p/Helpers/initialization-blacklist-extra.cc\<br>
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \<br>
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \<br>
-// RUN:   -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O2 %s %p/Helpers/initialization-blacklist-extra.cc\<br>
-// RUN:   %p/Helpers/initialization-blacklist-extra2.cc \<br>
-// RUN:   -fsanitize-blacklist=%p/Helpers/initialization-blacklist.txt \<br>
-// RUN:   -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-<br>
-// Function is defined in another TU.<br>
-int readBadGlobal();<br>
-int x = readBadGlobal();  // init-order bug.<br>
-<br>
-// Function is defined in another TU.<br>
-int accessBadObject();<br>
-int y = accessBadObject();  // init-order bug.<br>
-<br>
-int readBadSrcGlobal();<br>
-int z = readBadSrcGlobal();  // init-order bug.<br>
-<br>
-int main(int argc, char **argv) {<br>
-  return argc + x + y + z - 1;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/initialization-bug.cc (removed)<br>
@@ -1,49 +0,0 @@<br>
-// Test to make sure basic initialization order errors are caught.<br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 \<br>
-// RUN:    | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1 \<br>
-// RUN:     | %symbolize | FileCheck %s<br>
-<br>
-// Do not test with optimization -- the error may be optimized away.<br>
-<br>
-// FIXME: <a href="https://code.google.com/p/address-sanitizer/issues/detail?id=186" target="_blank">https://code.google.com/p/address-sanitizer/issues/detail?id=186</a><br>
-// XFAIL: darwin<br>
-<br>
-#include <cstdio><br>
-<br>
-// The structure of the test is:<br>
-// "x", "y", "z" are dynamically initialized globals.<br>
-// Value of "x" depends on "y", value of "y" depends on "z".<br>
-// "x" and "z" are defined in this TU, "y" is defined in another one.<br>
-// Thus we shoud stably report initialization order fiasco independently of<br>
-// the translation unit order.<br>
-<br>
-int initZ() {<br>
-  return 5;<br>
-}<br>
-int z = initZ();<br>
-<br>
-// 'y' is a dynamically initialized global residing in a different TU.  This<br>
-// dynamic initializer will read the value of 'y' before main starts.  The<br>
-// result is undefined behavior, which should be caught by initialization order<br>
-// checking.<br>
-extern int y;<br>
-int __attribute__((noinline)) initX() {<br>
-  return y + 1;<br>
-  // CHECK: {{AddressSanitizer: initialization-order-fiasco}}<br>
-  // CHECK: {{READ of size .* at 0x.* thread T0}}<br>
-  // CHECK: {{0x.* is located 0 bytes inside of global variable .*(y|z).*}}<br>
-}<br>
-<br>
-// This initializer begins our initialization order problems.<br>
-static int x = initX();<br>
-<br>
-int main() {<br>
-  // ASan should have caused an exit before main runs.<br>
-  printf("PASS\n");<br>
-  // CHECK-NOT: PASS<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/initialization-constexpr.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-constexpr.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-constexpr.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/initialization-constexpr.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/initialization-constexpr.cc (removed)<br>
@@ -1,43 +0,0 @@<br>
-// Constexpr:<br>
-// We need to check that a global variable initialized with a constexpr<br>
-// constructor can be accessed during dynamic initialization (as a constexpr<br>
-// constructor implies that it was initialized during constant initialization,<br>
-// not dynamic initialization).<br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O1 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O2 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O3 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O1 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O2 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O3 %s %p/Helpers/initialization-constexpr-extra.cc\<br>
-// RUN:   --std=c++11 -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-<br>
-class Integer {<br>
-  private:<br>
-  int value;<br>
-<br>
-  public:<br>
-  constexpr Integer(int x = 0) : value(x) {}<br>
-  int getValue() {return value;}<br>
-};<br>
-Integer coolestInteger(42);<br>
-int getCoolestInteger() { return coolestInteger.getValue(); }<br>
-<br>
-int main() { return 0; }<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/initialization-nobug.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-nobug.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/initialization-nobug.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/initialization-nobug.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/initialization-nobug.cc (removed)<br>
@@ -1,56 +0,0 @@<br>
-// A collection of various initializers which shouldn't trip up initialization<br>
-// order checking.  If successful, this will just return 0.<br>
-<br>
-// RUN: %clangxx_asan -m64 -O0 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O1 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O2 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m64 -O3 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O0 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O1 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O2 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-// RUN: %clangxx_asan -m32 -O3 %s %p/Helpers/initialization-nobug-extra.cc -fsanitize=init-order -o %t<br>
-// RUN: ASAN_OPTIONS=check_initialization_order=true %t 2>&1<br>
-<br>
-// Simple access:<br>
-// Make sure that accessing a global in the same TU is safe<br>
-<br>
-bool condition = true;<br>
-int initializeSameTU() {<br>
-  return condition ? 0x2a : 052;<br>
-}<br>
-int sameTU = initializeSameTU();<br>
-<br>
-// Linker initialized:<br>
-// Check that access to linker initialized globals originating from a different<br>
-// TU's initializer is safe.<br>
-<br>
-int A = (1 << 1) + (1 << 3) + (1 << 5), B;<br>
-int getAB() {<br>
-  return A * B;<br>
-}<br>
-<br>
-// Function local statics:<br>
-// Check that access to function local statics originating from a different<br>
-// TU's initializer is safe.<br>
-<br>
-int countCalls() {<br>
-  static int calls;<br>
-  return ++calls;<br>
-}<br>
-<br>
-// Trivial constructor, non-trivial destructor.<br>
-struct StructWithDtor {<br>
-  ~StructWithDtor() { }<br>
-  int value;<br>
-};<br>
-StructWithDtor struct_with_dtor;<br>
-int getStructWithDtorValue() { return struct_with_dtor.value; }<br>
-<br>
-int main() { return 0; }<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/interface_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/interface_test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/interface_test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/interface_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/interface_test.cc (removed)<br>
@@ -1,8 +0,0 @@<br>
-// Check that user may include ASan interface header.<br>
-// RUN: %clang -fsanitize=address -I %p/../../../include %s -o %t && %t<br>
-// RUN: %clang -I %p/../../../include %s -o %t && %t<br>
-#include <sanitizer/asan_interface.h><br>
-<br>
-int main() {<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/invalid-free.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/invalid-free.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/invalid-free.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/invalid-free.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/invalid-free.cc (removed)<br>
@@ -1,16 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <stdlib.h><br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  memset(x, 0, 10);<br>
-  int res = x[argc];<br>
-  free(x + 5);  // BOOM<br>
-  // CHECK: AddressSanitizer: attempting free on address{{.*}}in thread T0<br>
-  // CHECK: invalid-free.cc:[[@LINE-2]]<br>
-  // CHECK: is located 5 bytes inside of 10-byte region<br>
-  // CHECK: allocated by thread T0 here:<br>
-  // CHECK: invalid-free.cc:[[@LINE-8]]<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/large_func_test.cc (removed)<br>
@@ -1,63 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-<br>
-#include <stdlib.h><br>
-__attribute__((noinline))<br>
-static void LargeFunction(int *x, int zero) {<br>
-  x[0]++;<br>
-  x[1]++;<br>
-  x[2]++;<br>
-  x[3]++;<br>
-  x[4]++;<br>
-  x[5]++;<br>
-  x[6]++;<br>
-  x[7]++;<br>
-  x[8]++;<br>
-  x[9]++;<br>
-<br>
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-buffer-overflow on address}}<br>
-  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}<br>
-  // CHECK: {{READ of size 4 at 0x.* thread T0}}<br>
-  x[zero + 103]++;  // we should report this exact line<br>
-  // atos incorrectly extracts the symbol name for the static functions on<br>
-  // Darwin.<br>
-  // CHECK-Linux:  {{#0 0x.* in LargeFunction.*large_func_test.cc:}}[[@LINE-3]]<br>
-  // CHECK-Darwin: {{#0 0x.* in .*LargeFunction.*large_func_test.cc}}:[[@LINE-4]]<br>
-<br>
-  x[10]++;<br>
-  x[11]++;<br>
-  x[12]++;<br>
-  x[13]++;<br>
-  x[14]++;<br>
-  x[15]++;<br>
-  x[16]++;<br>
-  x[17]++;<br>
-  x[18]++;<br>
-  x[19]++;<br>
-}<br>
-<br>
-int main(int argc, char **argv) {<br>
-  int *x = new int[100];<br>
-  LargeFunction(x, argc - 1);<br>
-  // CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:}}[[@LINE-1]]<br>
-  // CHECK: {{0x.* is located 12 bytes to the right of 400-byte region}}<br>
-  // CHECK: {{allocated by thread T0 here:}}<br>
-  // CHECK-Linux: {{    #0 0x.* in operator new.*}}<br>
-  // CHECK-Darwin: {{    #0 0x.* in .*_Zna.*}}<br>
-  // CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:}}[[@LINE-7]]<br>
-  delete x;<br>
-}<br>
<br>
Modified: compiler-rt/trunk/lib/asan/lit_tests/lit.cfg<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.cfg?rev=183395&r1=183394&r2=183395&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.cfg?rev=183395&r1=183394&r2=183395&view=diff</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/lit.cfg (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/lit.cfg Thu Jun  6 04:23:34 2013<br>
@@ -77,7 +77,7 @@ if llvm_tools_dir:<br>
 # Setup path to symbolizer script.<br>
 # FIXME: Instead we should copy this script to the build tree and point<br>
 #        at it there.<br>
-asan_source_dir = os.path.join(config.test_source_root, "..")<br>
+asan_source_dir = get_required_attr(config, "asan_source_dir")<br>
 symbolizer = os.path.join(asan_source_dir,<br>
                          'scripts', 'asan_symbolize.py')<br>
 if not os.path.exists(symbolizer):<br>
<br>
Modified: compiler-rt/trunk/lib/asan/lit_tests/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.site.cfg.in?rev=183395&r1=183394&r2=183395&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.site.cfg.in?rev=183395&r1=183394&r2=183395&view=diff</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a> (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/<a href="http://lit.site.cfg.in" target="_blank">lit.site.cfg.in</a> Thu Jun  6 04:23:34 2013<br>
@@ -9,6 +9,7 @@ config.compiler_rt_src_root = "@COMPILER<br>
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"<br>
 config.clang = "@LLVM_BINARY_DIR@/bin/clang"<br>
 config.compiler_rt_arch = "@COMPILER_RT_SUPPORTED_ARCH@"<br>
+config.asan_source_dir = "@ASAN_SOURCE_DIR@"<br>
<br>
 # LLVM tools dir can be passed in lit parameters, so try to<br>
 # apply substitution.<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/log-path_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/log-path_test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/log-path_test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/log-path_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/log-path_test.cc (removed)<br>
@@ -1,39 +0,0 @@<br>
-// RUN: %clangxx_asan  %s -o %t<br>
-<br>
-// Regular run.<br>
-// RUN: not %t 2> %t.out<br>
-// RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t.out<br>
-<br>
-// Good log_path.<br>
-// RUN: rm -f %t.log.*<br>
-// RUN: ASAN_OPTIONS=log_path=%t.log not %t 2> %t.out<br>
-// RUN: FileCheck %s --check-prefix=CHECK-ERROR < %t.log.*<br>
-<br>
-// Invalid log_path.<br>
-// RUN: ASAN_OPTIONS=log_path=/INVALID not %t 2> %t.out<br>
-// RUN: FileCheck %s --check-prefix=CHECK-INVALID < %t.out<br>
-<br>
-// Too long log_path.<br>
-// RUN: ASAN_OPTIONS=log_path=`for((i=0;i<10000;i++)); do echo -n $i; done` \<br>
-// RUN:   not %t 2> %t.out<br>
-// RUN: FileCheck %s --check-prefix=CHECK-LONG < %t.out<br>
-<br>
-// Run w/o errors should not produce any log.<br>
-// RUN: rm -f %t.log.*<br>
-// RUN: ASAN_OPTIONS=log_path=%t.log  %t ARG ARG ARG<br>
-// RUN: not cat %t.log.*<br>
-<br>
-<br>
-#include <stdlib.h><br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  if (argc > 2) return 0;<br>
-  char *x = (char*)malloc(10);<br>
-  memset(x, 0, 10);<br>
-  int res = x[argc * 10];  // BOOOM<br>
-  free(x);<br>
-  return res;<br>
-}<br>
-// CHECK-ERROR: ERROR: AddressSanitizer<br>
-// CHECK-INVALID: ERROR: Can't open file: /INVALID<br>
-// CHECK-LONG: ERROR: Path is too long: 01234<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/log_path_fork_test.cc.disabled<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/log_path_fork_test.cc.disabled?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/log_path_fork_test.cc.disabled?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/log_path_fork_test.cc.disabled (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/log_path_fork_test.cc.disabled (removed)<br>
@@ -1,22 +0,0 @@<br>
-// RUN: %clangxx_asan  %s -o %t<br>
-// RUN: rm -f %t.log.*<br>
-// Set verbosity to 1 so that the log files are opened prior to fork().<br>
-// RUN: ASAN_OPTIONS="log_path=%t.log verbosity=1" not %t 2> %t.out<br>
-// RUN: for f in %t.log.* ; do FileCheck %s < $f; done<br>
-// RUN: [ `ls %t.log.* | wc -l` == 2 ]<br>
-<br>
-#include <stdlib.h><br>
-#include <string.h><br>
-#include <unistd.h><br>
-<br>
-int main(int argc, char **argv) {<br>
-  void *x = malloc(10);<br>
-  free(x);<br>
-  if (fork() == -1) return 1;<br>
-  // There are two processes at this point, thus there should be two distinct<br>
-  // error logs.<br>
-  free(x);<br>
-  return 0;<br>
-}<br>
-<br>
-// CHECK: ERROR: AddressSanitizer<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/malloc_fill.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/malloc_fill.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/malloc_fill.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/malloc_fill.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/malloc_fill.cc (removed)<br>
@@ -1,22 +0,0 @@<br>
-// Check that we fill malloc-ed memory correctly.<br>
-// RUN: %clangxx_asan -m64 %s -o %t<br>
-// RUN: %t | FileCheck %s<br>
-// RUN: ASAN_OPTIONS=max_malloc_fill_size=10:malloc_fill_byte=8 %t | FileCheck %s --check-prefix=CHECK-10-8<br>
-// RUN: ASAN_OPTIONS=max_malloc_fill_size=20:malloc_fill_byte=171 %t | FileCheck %s --check-prefix=CHECK-20-ab<br>
-<br>
-#include <stdio.h><br>
-int main(int argc, char **argv) {<br>
-  // With asan allocator this makes sure we get memory from mmap.<br>
-  static const int kSize = 1 << 25;<br>
-  unsigned char *x = new unsigned char[kSize];<br>
-  printf("-");<br>
-  for (int i = 0; i <= 32; i++) {<br>
-    printf("%02x", x[i]);<br>
-  }<br>
-  printf("-\n");<br>
-  delete [] x;<br>
-}<br>
-<br>
-// CHECK: -bebebebebebebebebebebebebebebebebebebebebebebebebebebebebebebebebe-<br>
-// CHECK-10-8: -080808080808080808080000000000000000000000000000000000000000000000-<br>
-// CHECK-20-ab: -abababababababababababababababababababab00000000000000000000000000-<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/malloc_hook.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/malloc_hook.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/malloc_hook.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/malloc_hook.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/malloc_hook.cc (removed)<br>
@@ -1,36 +0,0 @@<br>
-// RUN: %clangxx_asan -O2 %s -o %t<br>
-// RUN: %t 2>&1 | FileCheck %s<br>
-#include <stdlib.h><br>
-#include <unistd.h><br>
-<br>
-extern "C" {<br>
-bool __asan_get_ownership(const void *p);<br>
-<br>
-void *global_ptr;<br>
-<br>
-// Note: avoid calling functions that allocate memory in malloc/free<br>
-// to avoid infinite recursion.<br>
-void __asan_malloc_hook(void *ptr, size_t sz) {<br>
-  if (__asan_get_ownership(ptr)) {<br>
-    write(1, "MallocHook\n", sizeof("MallocHook\n"));<br>
-    global_ptr = ptr;<br>
-  }<br>
-}<br>
-void __asan_free_hook(void *ptr) {<br>
-  if (__asan_get_ownership(ptr) && ptr == global_ptr)<br>
-    write(1, "FreeHook\n", sizeof("FreeHook\n"));<br>
-}<br>
-}  // extern "C"<br>
-<br>
-int main() {<br>
-  volatile int *x = new int;<br>
-  // CHECK: MallocHook<br>
-  // Check that malloc hook was called with correct argument.<br>
-  if (global_ptr != (void*)x) {<br>
-    _exit(1);<br>
-  }<br>
-  *x = 0;<br>
-  delete x;<br>
-  // CHECK: FreeHook<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/memcmp_strict_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/memcmp_strict_test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/memcmp_strict_test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/memcmp_strict_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/memcmp_strict_test.cc (removed)<br>
@@ -1,16 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=0 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-nonstrict<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && ASAN_OPTIONS=strict_memcmp=1 %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-strict<br>
-// Default to strict_memcmp=1.<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK-strict<br>
-<br>
-#include <stdio.h><br>
-#include <string.h><br>
-int main() {<br>
-  char kFoo[] = "foo";<br>
-  char kFubar[] = "fubar";<br>
-  int res = memcmp(kFoo, kFubar, strlen(kFubar));<br>
-  printf("res: %d\n", res);<br>
-  // CHECK-nonstrict: {{res: -1}}<br>
-  // CHECK-strict: AddressSanitizer: stack-buffer-overflow<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/memcmp_test.cc (removed)<br>
@@ -1,19 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  char a1[] = {argc, 2, 3, 4};<br>
-  char a2[] = {1, 2*argc, 3, 4};<br>
-  int res = memcmp(a1, a2, 4 + argc);  // BOOM<br>
-  // CHECK: AddressSanitizer: stack-buffer-overflow<br>
-  // CHECK: {{#0.*memcmp}}<br>
-  // CHECK: {{#1.*main}}<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/null_deref.cc (removed)<br>
@@ -1,31 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-<br>
-__attribute__((noinline))<br>
-static void NullDeref(int *ptr) {<br>
-  // CHECK: ERROR: AddressSanitizer: SEGV on unknown address<br>
-  // CHECK:   {{0x0*00028 .*pc 0x.*}}<br>
-  // CHECK: {{AddressSanitizer can not provide additional info.}}<br>
-  ptr[10]++;  // BOOM<br>
-  // atos on Mac cannot extract the symbol name correctly.<br>
-  // CHECK-Linux: {{    #0 0x.* in NullDeref.*null_deref.cc:}}[[@LINE-2]]<br>
-  // CHECK-Darwin: {{    #0 0x.* in .*NullDeref.*null_deref.cc:}}[[@LINE-3]]<br>
-}<br>
-int main() {<br>
-  NullDeref((int*)0);<br>
-  // CHECK: {{    #1 0x.* in _?main.*null_deref.cc:}}[[@LINE-1]]<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/on_error_callback.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/on_error_callback.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/on_error_callback.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/on_error_callback.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/on_error_callback.cc (removed)<br>
@@ -1,16 +0,0 @@<br>
-// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s<br>
-<br>
-#include <stdio.h><br>
-#include <stdlib.h><br>
-<br>
-extern "C"<br>
-void __asan_on_error() {<br>
-  fprintf(stderr, "__asan_on_error called");<br>
-}<br>
-<br>
-int main() {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  free(x);<br>
-  return x[5];<br>
-  // CHECK: __asan_on_error called<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/partial_right.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/partial_right.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/partial_right.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/partial_right.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/partial_right.cc (removed)<br>
@@ -1,17 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <stdlib.h><br>
-int main(int argc, char **argv) {<br>
-  volatile int *x = (int*)malloc(2*sizeof(int) + 2);<br>
-  int res = x[2];  // BOOOM<br>
-  // CHECK: {{READ of size 4 at 0x.* thread T0}}<br>
-  // CHECK: [[ADDR:0x[01-9a-fa-f]+]] is located 0 bytes to the right of {{.*}}-byte region [{{.*}},{{.*}}[[ADDR]])<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/sanity_check_pure_c.c (removed)<br>
@@ -1,19 +0,0 @@<br>
-// Sanity checking a test in pure C.<br>
-// RUN: %clang -g -fsanitize=address -O2 %s -o %t<br>
-// RUN: %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// Sanity checking a test in pure C with -pie.<br>
-// RUN: %clang -g -fsanitize=address -O2 %s -pie -o %t<br>
-// RUN: %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <stdlib.h><br>
-int main() {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  free(x);<br>
-  return x[5];<br>
-  // CHECK: heap-use-after-free<br>
-  // CHECK: free<br>
-  // CHECK: main{{.*}}sanity_check_pure_c.c:[[@LINE-4]]<br>
-  // CHECK: malloc<br>
-  // CHECK: main{{.*}}sanity_check_pure_c.c:[[@LINE-7]]<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/shared-lib-test.cc (removed)<br>
@@ -1,54 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %p/SharedLibs/shared-lib-test-so.cc \<br>
-// RUN:     -fPIC -shared -o %t-so.so<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <dlfcn.h><br>
-#include <stdio.h><br>
-#include <string.h><br>
-<br>
-#include <string><br>
-<br>
-using std::string;<br>
-<br>
-typedef void (fun_t)(int x);<br>
-<br>
-int main(int argc, char *argv[]) {<br>
-  string path = string(argv[0]) + "-so.so";<br>
-  printf("opening %s ... \n", path.c_str());<br>
-  void *lib = dlopen(path.c_str(), RTLD_NOW);<br>
-  if (!lib) {<br>
-    printf("error in dlopen(): %s\n", dlerror());<br>
-    return 1;<br>
-  }<br>
-  fun_t *inc = (fun_t*)dlsym(lib, "inc");<br>
-  if (!inc) return 1;<br>
-  printf("ok\n");<br>
-  inc(1);<br>
-  inc(-1);  // BOOM<br>
-  // CHECK: {{.*ERROR: AddressSanitizer: global-buffer-overflow}}<br>
-  // CHECK: {{READ of size 4 at 0x.* thread T0}}<br>
-  // CHECK: {{    #0 0x.*}}<br>
-  // CHECK: {{    #1 0x.* in _?main .*shared-lib-test.cc:}}[[@LINE-4]]<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/sleep_before_dying.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/sleep_before_dying.c?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/sleep_before_dying.c?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/sleep_before_dying.c (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/sleep_before_dying.c (removed)<br>
@@ -1,10 +0,0 @@<br>
-// RUN: %clang -g -fsanitize=address -O2 %s -o %t<br>
-// RUN: ASAN_OPTIONS="sleep_before_dying=1" %t 2>&1 | FileCheck %s<br>
-<br>
-#include <stdlib.h><br>
-int main() {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  free(x);<br>
-  return x[5];<br>
-  // CHECK: Sleeping for 1 second<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/stack-frame-demangle.cc (removed)<br>
@@ -1,22 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <string.h><br>
-<br>
-namespace XXX {<br>
-struct YYY {<br>
-  static int ZZZ(int x) {<br>
-    char array[10];<br>
-    memset(array, 0, 10);<br>
-    return array[x];  // BOOOM<br>
-    // CHECK: ERROR: AddressSanitizer: stack-buffer-overflow<br>
-    // CHECK: READ of size 1 at<br>
-    // CHECK: is located in stack of thread T0 at offset<br>
-    // CHECK: XXX::YYY::ZZZ<br>
-  }<br>
-};<br>
-}  // namespace XXX<br>
-<br>
-int main(int argc, char **argv) {<br>
-  int res = XXX::YYY::ZZZ(argc + 10);<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/stack-oob-frames.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-oob-frames.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-oob-frames.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/stack-oob-frames.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/stack-oob-frames.cc (removed)<br>
@@ -1,59 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t<br>
-// RUN: %t 0 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK0<br>
-// RUN: %t 1 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK1<br>
-// RUN: %t 2 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK2<br>
-// RUN: %t 3 2>&1 | %symbolize | FileCheck %s --check-prefix=CHECK3<br>
-<br>
-#define NOINLINE __attribute__((noinline))<br>
-inline void break_optimization(void *arg) {<br>
-  __asm__ __volatile__("" : : "r" (arg) : "memory");<br>
-}<br>
-<br>
-NOINLINE static void Frame0(int frame, char *a, char *b, char *c) {<br>
-  char s[4] = {0};<br>
-  char *d = s;<br>
-  break_optimization(&d);<br>
-  switch (frame) {<br>
-    case 3: a[5]++; break;<br>
-    case 2: b[5]++; break;<br>
-    case 1: c[5]++; break;<br>
-    case 0: d[5]++; break;<br>
-  }<br>
-}<br>
-NOINLINE static void Frame1(int frame, char *a, char *b) {<br>
-  char c[4] = {0}; Frame0(frame, a, b, c);<br>
-  break_optimization(0);<br>
-}<br>
-NOINLINE static void Frame2(int frame, char *a) {<br>
-  char b[4] = {0}; Frame1(frame, a, b);<br>
-  break_optimization(0);<br>
-}<br>
-NOINLINE static void Frame3(int frame) {<br>
-  char a[4] = {0}; Frame2(frame, a);<br>
-  break_optimization(0);<br>
-}<br>
-<br>
-int main(int argc, char **argv) {<br>
-  if (argc != 2) return 1;<br>
-  Frame3(argv[1][0] - '0');<br>
-}<br>
-<br>
-// CHECK0: AddressSanitizer: stack-buffer-overflow<br>
-// CHECK0: #0{{.*}}Frame0<br>
-// CHECK0: #1{{.*}}Frame1<br>
-// CHECK0: #2{{.*}}Frame2<br>
-// CHECK0: #3{{.*}}Frame3<br>
-// CHECK0: is located in stack of thread T0 at offset<br>
-// CHECK0-NEXT: #0{{.*}}Frame0<br>
-//<br>
-// CHECK1: AddressSanitizer: stack-buffer-overflow<br>
-// CHECK1: is located in stack of thread T0 at offset<br>
-// CHECK1-NEXT: #0{{.*}}Frame1<br>
-//<br>
-// CHECK2: AddressSanitizer: stack-buffer-overflow<br>
-// CHECK2: is located in stack of thread T0 at offset<br>
-// CHECK2-NEXT: #0{{.*}}Frame2<br>
-//<br>
-// CHECK3: AddressSanitizer: stack-buffer-overflow<br>
-// CHECK3: is located in stack of thread T0 at offset<br>
-// CHECK3-NEXT: #0{{.*}}Frame3<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/stack-overflow.cc (removed)<br>
@@ -1,20 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  char x[10];<br>
-  memset(x, 0, 10);<br>
-  int res = x[argc * 10];  // BOOOM<br>
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}<br>
-  // CHECK: {{    #0 0x.* in _?main .*stack-overflow.cc:}}[[@LINE-2]]<br>
-  // CHECK: {{Address 0x.* is located in stack of thread T0 at offset}}<br>
-  // CHECK-NEXT: in{{.*}}main{{.*}}stack-overflow.cc<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/stack-use-after-return.cc (removed)<br>
@@ -1,45 +0,0 @@<br>
-// XFAIL: *<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O0 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O1 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O2 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m64 -O3 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O0 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O1 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O2 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -fsanitize=use-after-return -m32 -O3 %s -o %t && \<br>
-// RUN:   %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <stdio.h><br>
-<br>
-__attribute__((noinline))<br>
-char *Ident(char *x) {<br>
-  fprintf(stderr, "1: %p\n", x);<br>
-  return x;<br>
-}<br>
-<br>
-__attribute__((noinline))<br>
-char *Func1() {<br>
-  char local;<br>
-  return Ident(&local);<br>
-}<br>
-<br>
-__attribute__((noinline))<br>
-void Func2(char *x) {<br>
-  fprintf(stderr, "2: %p\n", x);<br>
-  *x = 1;<br>
-  // CHECK: WRITE of size 1 {{.*}} thread T0<br>
-  // CHECK:     #0{{.*}}Func2{{.*}}stack-use-after-return.cc:[[@LINE-2]]<br>
-  // CHECK: is located {{.*}} in frame <{{.*}}Func1{{.*}}> of T0's stack<br>
-}<br>
-<br>
-int main(int argc, char **argv) {<br>
-  Func2(Func1());<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/strip_path_prefix.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/strip_path_prefix.c?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/strip_path_prefix.c?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/strip_path_prefix.c (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/strip_path_prefix.c (removed)<br>
@@ -1,12 +0,0 @@<br>
-// RUN: %clang -g -fsanitize=address -O2 %s -o %t<br>
-// RUN: ASAN_OPTIONS="strip_path_prefix='/'" %t 2>&1 | FileCheck %s<br>
-<br>
-#include <stdlib.h><br>
-int main() {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  free(x);<br>
-  return x[5];<br>
-  // Check that paths in error report don't start with slash.<br>
-  // CHECK: heap-use-after-free<br>
-  // CHECK-NOT: #0 0x{{.*}} ({{[/].*}})<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/strncpy-overflow.cc (removed)<br>
@@ -1,38 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-<br>
-#include <string.h><br>
-#include <stdlib.h><br>
-int main(int argc, char **argv) {<br>
-  char *hello = (char*)malloc(6);<br>
-  strcpy(hello, "hello");<br>
-  char *short_buffer = (char*)malloc(9);<br>
-  strncpy(short_buffer, hello, 10);  // BOOM<br>
-  // CHECK: {{WRITE of size 10 at 0x.* thread T0}}<br>
-  // CHECK-Linux: {{    #0 0x.* in .*strncpy}}<br>
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_strncpy}}<br>
-  // CHECK: {{    #1 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-4]]<br>
-  // CHECK: {{0x.* is located 0 bytes to the right of 9-byte region}}<br>
-  // CHECK: {{allocated by thread T0 here:}}<br>
-<br>
-  // CHECK-Linux: {{    #0 0x.* in .*malloc}}<br>
-  // CHECK-Linux: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-10]]<br>
-<br>
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}<br>
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-13]]<br>
-  return short_buffer[8];<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/symbolize_callback.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/symbolize_callback.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/symbolize_callback.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/symbolize_callback.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/symbolize_callback.cc (removed)<br>
@@ -1,17 +0,0 @@<br>
-// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s<br>
-<br>
-#include <stdio.h><br>
-#include <stdlib.h><br>
-<br>
-extern "C"<br>
-bool __asan_symbolize(const void *pc, char *out_buffer, int out_size) {<br>
-  snprintf(out_buffer, out_size, "MySymbolizer");<br>
-  return true;<br>
-}<br>
-<br>
-int main() {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  free(x);<br>
-  return x[5];<br>
-  // CHECK: MySymbolizer<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/throw_call_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/throw_call_test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/throw_call_test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/throw_call_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/throw_call_test.cc (removed)<br>
@@ -1,45 +0,0 @@<br>
-// RUN: %clangxx_asan %s -o %t && %t<br>
-// <a href="http://code.google.com/p/address-sanitizer/issues/detail?id=147" target="_blank">http://code.google.com/p/address-sanitizer/issues/detail?id=147</a> (not fixed).<br>
-// BROKEN: %clangxx_asan %s -o %t -static-libstdc++ && %t<br>
-#include <stdio.h><br>
-static volatile int zero = 0;<br>
-inline void pretend_to_do_something(void *x) {<br>
-  __asm__ __volatile__("" : : "r" (x) : "memory");<br>
-}<br>
-<br>
-__attribute__((noinline, no_sanitize_address))<br>
-void ReallyThrow() {<br>
-  fprintf(stderr, "ReallyThrow\n");<br>
-  if (zero == 0)<br>
-    throw 42;<br>
-}<br>
-<br>
-__attribute__((noinline))<br>
-void Throw() {<br>
-  int a, b, c, d, e;<br>
-  pretend_to_do_something(&a);<br>
-  pretend_to_do_something(&b);<br>
-  pretend_to_do_something(&c);<br>
-  pretend_to_do_something(&d);<br>
-  pretend_to_do_something(&e);<br>
-  fprintf(stderr, "Throw stack = %p\n", &a);<br>
-  ReallyThrow();<br>
-}<br>
-<br>
-__attribute__((noinline))<br>
-void CheckStack() {<br>
-  int ar[100];<br>
-  pretend_to_do_something(ar);<br>
-  for (int i = 0; i < 100; i++)<br>
-    ar[i] = i;<br>
-  fprintf(stderr, "CheckStack stack = %p, %p\n", ar, ar + 100);<br>
-}<br>
-<br>
-int main(int argc, char** argv) {<br>
-  try {<br>
-    Throw();<br>
-  } catch(int a) {<br>
-    fprintf(stderr, "a = %d\n", a);<br>
-  }<br>
-  CheckStack();<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/throw_invoke_test.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/throw_invoke_test.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/throw_invoke_test.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/throw_invoke_test.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/throw_invoke_test.cc (removed)<br>
@@ -1,50 +0,0 @@<br>
-// RUN: %clangxx_asan %s -o %t && %t<br>
-// RUN: %clangxx_asan %s -o %t -static-libstdc++ && %t<br>
-#include <stdio.h><br>
-static volatile int zero = 0;<br>
-inline void pretend_to_do_something(void *x) {<br>
-  __asm__ __volatile__("" : : "r" (x) : "memory");<br>
-}<br>
-<br>
-__attribute__((noinline))<br>
-void ReallyThrow() {<br>
-  fprintf(stderr, "ReallyThrow\n");<br>
-  try {<br>
-    if (zero == 0)<br>
-      throw 42;<br>
-    else if (zero == 1)<br>
-      throw 1.;<br>
-  } catch(double x) {<br>
-  }<br>
-}<br>
-<br>
-__attribute__((noinline))<br>
-void Throw() {<br>
-  int a, b, c, d, e;<br>
-  pretend_to_do_something(&a);<br>
-  pretend_to_do_something(&b);<br>
-  pretend_to_do_something(&c);<br>
-  pretend_to_do_something(&d);<br>
-  pretend_to_do_something(&e);<br>
-  fprintf(stderr, "Throw stack = %p\n", &a);<br>
-  ReallyThrow();<br>
-}<br>
-<br>
-__attribute__((noinline))<br>
-void CheckStack() {<br>
-  int ar[100];<br>
-  pretend_to_do_something(ar);<br>
-  for (int i = 0; i < 100; i++)<br>
-    ar[i] = i;<br>
-  fprintf(stderr, "CheckStack stack = %p, %p\n", ar, ar + 100);<br>
-}<br>
-<br>
-int main(int argc, char** argv) {<br>
-  try {<br>
-    Throw();<br>
-  } catch(int a) {<br>
-    fprintf(stderr, "a = %d\n", a);<br>
-  }<br>
-  CheckStack();<br>
-}<br>
-<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/time_interceptor.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/time_interceptor.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/time_interceptor.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/time_interceptor.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/time_interceptor.cc (removed)<br>
@@ -1,16 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// Test the time() interceptor.<br>
-<br>
-#include <stdio.h><br>
-#include <stdlib.h><br>
-#include <time.h><br>
-<br>
-int main() {<br>
-  time_t *tm = (time_t*)malloc(sizeof(time_t));<br>
-  free(tm);<br>
-  time_t t = time(tm);<br>
-  printf("Time: %s\n", ctime(&t));  // NOLINT<br>
-  // CHECK: use-after-free<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/unaligned_loads_and_stores.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/unaligned_loads_and_stores.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/unaligned_loads_and_stores.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/unaligned_loads_and_stores.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/unaligned_loads_and_stores.cc (removed)<br>
@@ -1,52 +0,0 @@<br>
-// RUN: %clangxx_asan -O0 -I %p/../../../include %s -o %t<br>
-// RUN: %t A 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-A %s<br>
-// RUN: %t B 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-B %s<br>
-// RUN: %t C 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-C %s<br>
-// RUN: %t D 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-D %s<br>
-// RUN: %t E 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-E %s<br>
-<br>
-// RUN: %t K 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-K %s<br>
-// RUN: %t L 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-L %s<br>
-// RUN: %t M 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-M %s<br>
-// RUN: %t N 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-N %s<br>
-// RUN: %t O 2>&1 | %symbolize | FileCheck --check-prefix=CHECK-O %s<br>
-<br>
-#include <sanitizer/asan_interface.h><br>
-<br>
-#include <stdlib.h><br>
-#include <string.h><br>
-int main(int argc, char **argv) {<br>
-  if (argc != 2) return 1;<br>
-  char *x = new char[16];<br>
-  memset(x, 0xab, 16);<br>
-  int res = 1;<br>
-  switch (argv[1][0]) {<br>
-    case 'A': res = __sanitizer_unaligned_load16(x + 15); break;<br>
-//  CHECK-A ERROR: AddressSanitizer: heap-buffer-overflow on address<br>
-//  CHECK-A: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-2]]<br>
-//  CHECK-A: is located 0 bytes to the right of 16-byte region<br>
-    case 'B': res = __sanitizer_unaligned_load32(x + 14); break;<br>
-//  CHECK-B: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-    case 'C': res = __sanitizer_unaligned_load32(x + 13); break;<br>
-//  CHECK-C: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-    case 'D': res = __sanitizer_unaligned_load64(x + 15); break;<br>
-//  CHECK-D: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-    case 'E': res = __sanitizer_unaligned_load64(x + 9); break;<br>
-//  CHECK-E: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-<br>
-    case 'K': __sanitizer_unaligned_store16(x + 15, 0); break;<br>
-//  CHECK-K ERROR: AddressSanitizer: heap-buffer-overflow on address<br>
-//  CHECK-K: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-2]]<br>
-//  CHECK-K: is located 0 bytes to the right of 16-byte region<br>
-    case 'L': __sanitizer_unaligned_store32(x + 15, 0); break;<br>
-//  CHECK-L: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-    case 'M': __sanitizer_unaligned_store32(x + 13, 0); break;<br>
-//  CHECK-M: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-    case 'N': __sanitizer_unaligned_store64(x + 10, 0); break;<br>
-//  CHECK-N: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-    case 'O': __sanitizer_unaligned_store64(x + 14, 0); break;<br>
-//  CHECK-O: main{{.*}}unaligned_loads_and_stores.cc:[[@LINE-1]]<br>
-  }<br>
-  delete x;<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-free-right.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-free-right.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-free-right.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-free-right.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-free-right.cc (removed)<br>
@@ -1,46 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-<br>
-// Test use-after-free report in the case when access is at the right border of<br>
-//  the allocation.<br>
-<br>
-#include <stdlib.h><br>
-int main() {<br>
-  volatile char *x = (char*)malloc(sizeof(char));<br>
-  free((void*)x);<br>
-  *x = 42;<br>
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}<br>
-  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}<br>
-  // CHECK: {{WRITE of size 1 at 0x.* thread T0}}<br>
-  // CHECK: {{    #0 0x.* in _?main .*use-after-free-right.cc:25}}<br>
-  // CHECK: {{0x.* is located 0 bytes inside of 1-byte region .0x.*,0x.*}}<br>
-  // CHECK: {{freed by thread T0 here:}}<br>
-<br>
-  // CHECK-Linux: {{    #0 0x.* in .*free}}<br>
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:24}}<br>
-<br>
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_free}}<br>
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:24}}<br>
-<br>
-  // CHECK: {{previously allocated by thread T0 here:}}<br>
-<br>
-  // CHECK-Linux: {{    #0 0x.* in .*malloc}}<br>
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:23}}<br>
-<br>
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}<br>
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:23}}<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-free.cc (removed)<br>
@@ -1,43 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m64 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O0 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O1 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O2 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-// RUN: %clangxx_asan -m32 -O3 %s -o %t && %t 2>&1 | %symbolize > %t.out<br>
-// RUN: FileCheck %s < %t.out && FileCheck %s --check-prefix=CHECK-%os < %t.out<br>
-<br>
-#include <stdlib.h><br>
-int main() {<br>
-  char *x = (char*)malloc(10 * sizeof(char));<br>
-  free(x);<br>
-  return x[5];<br>
-  // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}<br>
-  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}<br>
-  // CHECK: {{READ of size 1 at 0x.* thread T0}}<br>
-  // CHECK: {{    #0 0x.* in _?main .*use-after-free.cc:22}}<br>
-  // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}<br>
-  // CHECK: {{freed by thread T0 here:}}<br>
-<br>
-  // CHECK-Linux: {{    #0 0x.* in .*free}}<br>
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:21}}<br>
-<br>
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_free}}<br>
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:21}}<br>
-<br>
-  // CHECK: {{previously allocated by thread T0 here:}}<br>
-<br>
-  // CHECK-Linux: {{    #0 0x.* in .*malloc}}<br>
-  // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:20}}<br>
-<br>
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}<br>
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:20}}<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-poison.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-poison.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-poison.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-poison.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-poison.cc (removed)<br>
@@ -1,20 +0,0 @@<br>
-// Check that __asan_poison_memory_region works.<br>
-// RUN: %clangxx_asan -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-//<br>
-// Check that we can disable it<br>
-// RUN: ASAN_OPTIONS=allow_user_poisoning=0 %t<br>
-<br>
-#include <stdlib.h><br>
-<br>
-extern "C" void __asan_poison_memory_region(void *, size_t);<br>
-<br>
-int main(int argc, char **argv) {<br>
-  char *x = new char[16];<br>
-  x[10] = 0;<br>
-  __asan_poison_memory_region(x, 16);<br>
-  int res = x[argc * 10];  // BOOOM<br>
-  // CHECK: ERROR: AddressSanitizer: use-after-poison<br>
-  // CHECK: main{{.*}}use-after-poison.cc:[[@LINE-2]]<br>
-  delete [] x;<br>
-  return res;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-dtor-order.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-dtor-order.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-dtor-order.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-dtor-order.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-dtor-order.cc (removed)<br>
@@ -1,25 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \<br>
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s<br>
-#include <stdio.h><br>
-<br>
-struct IntHolder {<br>
-  explicit IntHolder(int *val = 0) : val_(val) { }<br>
-  ~IntHolder() {<br>
-    printf("Value: %d\n", *val_);  // BOOM<br>
-    // CHECK: ERROR: AddressSanitizer: stack-use-after-scope<br>
-    // CHECK:  #0 0x{{.*}} in IntHolder::~IntHolder{{.*}}use-after-scope-dtor-order.cc:[[@LINE-2]]<br>
-  }<br>
-  void set(int *val) { val_ = val; }<br>
-  int *get() { return val_; }<br>
-<br>
-  int *val_;<br>
-};<br>
-<br>
-int main(int argc, char *argv[]) {<br>
-  // It is incorrect to use "x" int IntHolder destructor, because "x" is<br>
-  // "destroyed" earlier as it's declared later.<br>
-  IntHolder holder;<br>
-  int x = argc;<br>
-  holder.set(&x);<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-inlined.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-inlined.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-inlined.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-inlined.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-inlined.cc (removed)<br>
@@ -1,30 +0,0 @@<br>
-// Test with "-O2" only to make sure inlining (leading to use-after-scope)<br>
-// happens. "always_inline" is not enough, as Clang doesn't emit<br>
-// llvm.lifetime intrinsics at -O0.<br>
-//<br>
-// RUN: %clangxx_asan -m64 -O2 -fsanitize=use-after-scope %s -o %t && \<br>
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -m32 -O2 -fsanitize=use-after-scope %s -o %t && \<br>
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-int *arr;<br>
-<br>
-__attribute__((always_inline))<br>
-void inlined(int arg) {<br>
-  int x[5];<br>
-  for (int i = 0; i < arg; i++) x[i] = i;<br>
-  arr = x;<br>
-}<br>
-<br>
-int main(int argc, char *argv[]) {<br>
-  inlined(argc);<br>
-  return arr[argc - 1];  // BOOM<br>
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope<br>
-  // CHECK: READ of size 4 at 0x{{.*}} thread T0<br>
-  // CHECK:   #0 0x{{.*}} in {{_?}}main<br>
-  // CHECK:      {{.*}}use-after-scope-inlined.cc:[[@LINE-4]]<br>
-  // CHECK: Address 0x{{.*}} is located in stack of thread T0 at offset<br>
-  // CHECK:      [[OFFSET:[^ ]*]] in frame<br>
-  // CHECK: main<br>
-  // CHECK:   {{\[}}[[OFFSET]], {{.*}}) 'x.i'<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-nobug.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-nobug.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-nobug.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-nobug.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-nobug.cc (removed)<br>
@@ -1,16 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \<br>
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-#include <stdio.h><br>
-<br>
-int main() {<br>
-  int *p = 0;<br>
-  // Variable goes in and out of scope.<br>
-  for (int i = 0; i < 3; i++) {<br>
-    int x = 0;<br>
-    p = &x;<br>
-  }<br>
-  printf("PASSED\n");<br>
-  // CHECK: PASSED<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-temp.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-temp.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-temp.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-temp.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-scope-temp.cc (removed)<br>
@@ -1,29 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \<br>
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s<br>
-//<br>
-// Lifetime for temporaries is not emitted yet.<br>
-// XFAIL: *<br>
-<br>
-#include <stdio.h><br>
-<br>
-struct IntHolder {<br>
-  explicit IntHolder(int val) : val(val) {<br>
-    printf("IntHolder: %d\n", val);<br>
-  }<br>
-  int val;<br>
-};<br>
-<br>
-const IntHolder *saved;<br>
-<br>
-void save(const IntHolder &holder) {<br>
-  saved = &holder;<br>
-}<br>
-<br>
-int main(int argc, char *argv[]) {<br>
-  save(IntHolder(10));<br>
-  int x = saved->val;  // BOOM<br>
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope<br>
-  // CHECK:  #0 0x{{.*}} in {{_?}}main {{.*}}use-after-scope-temp.cc:[[@LINE-2]]<br>
-  printf("saved value: %d\n", x);<br>
-  return 0;<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/use-after-scope.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/use-after-scope.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/use-after-scope.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/use-after-scope.cc (removed)<br>
@@ -1,15 +0,0 @@<br>
-// RUN: %clangxx_asan -m64 -O0 -fsanitize=use-after-scope %s -o %t && \<br>
-// RUN:     %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-int main() {<br>
-  int *p = 0;<br>
-  {<br>
-    int x = 0;<br>
-    p = &x;<br>
-  }<br>
-  return *p;  // BOOM<br>
-  // CHECK: ERROR: AddressSanitizer: stack-use-after-scope<br>
-  // CHECK:  #0 0x{{.*}} in {{_?}}main {{.*}}use-after-scope.cc:[[@LINE-2]]<br>
-  // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame<br>
-  // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'<br>
-}<br>
<br>
Removed: compiler-rt/trunk/lib/asan/lit_tests/wait.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/wait.cc?rev=183394&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/wait.cc?rev=183394&view=auto</a><br>

==============================================================================<br>
--- compiler-rt/trunk/lib/asan/lit_tests/wait.cc (original)<br>
+++ compiler-rt/trunk/lib/asan/lit_tests/wait.cc (removed)<br>
@@ -1,77 +0,0 @@<br>
-// RUN: %clangxx_asan -DWAIT -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// RUN: %clangxx_asan -DWAITPID -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAITPID -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAITPID -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAITPID -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// RUN: %clangxx_asan -DWAITID -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAITID -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAITID -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAITID -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// RUN: %clangxx_asan -DWAIT3 -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT3 -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT3 -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT3 -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// RUN: %clangxx_asan -DWAIT4 -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT4 -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT4 -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT4 -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT3_RUSAGE -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m64 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m64 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m32 -O0 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-// RUN: %clangxx_asan -DWAIT4_RUSAGE -m32 -O3 %s -o %t && %t 2>&1 | %symbolize | FileCheck %s<br>
-<br>
-<br>
-#include <assert.h><br>
-#include <sys/wait.h><br>
-#include <unistd.h><br>
-<br>
-int main(int argc, char **argv) {<br>
-  pid_t pid = fork();<br>
-  if (pid) { // parent<br>
-    int x[3];<br>
-    int *status = x + argc * 3;<br>
-    int res;<br>
-#if defined(WAIT)<br>
-    res = wait(status);<br>
-#elif defined(WAITPID)<br>
-    res = waitpid(pid, status, WNOHANG);<br>
-#elif defined(WAITID)<br>
-    siginfo_t *si = (siginfo_t*)(x + argc * 3);<br>
-    res = waitid(P_ALL, 0, si, WEXITED | WNOHANG);<br>
-#elif defined(WAIT3)<br>
-    res = wait3(status, WNOHANG, NULL);<br>
-#elif defined(WAIT4)<br>
-    res = wait4(pid, status, WNOHANG, NULL);<br>
-#elif defined(WAIT3_RUSAGE) || defined(WAIT4_RUSAGE)<br>
-    struct rusage *ru = (struct rusage*)(x + argc * 3);<br>
-    int good_status;<br>
-# if defined(WAIT3_RUSAGE)<br>
-    res = wait3(&good_status, WNOHANG, ru);<br>
-# elif defined(WAIT4_RUSAGE)<br>
-    res = wait4(pid, &good_status, WNOHANG, ru);<br>
-# endif<br>
-#endif<br>
-    // CHECK: stack-buffer-overflow<br>
-    // CHECK: {{WRITE of size .* at 0x.* thread T0}}<br>
-    // CHECK: {{in .*wait}}<br>
-    // CHECK: {{in _?main .*wait.cc:}}<br>
-    // CHECK: is located in stack of thread T0 at offset<br>
-    // CHECK: {{in _?main}}<br>
-    return res != -1;<br>
-  }<br>
-  // child<br>
-  return 0;<br>
-}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>