• Home
  • History
  • Annotate
  • only in /external/compiler-rt/lib/asan/
History log of /external/compiler-rt/lib/asan/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d71de26cedae3dafc17449fe0182045c0bd20e8 21-Jul-2014 Stephen Hines <srhines@google.com> Update compiler-rt for rebase to r212749.

Includes a cherry-pick of:
r213309 - fixes umodsi3

Change-Id: Ic7367e3586b6af7ef74bee6a8cf437d5f28d975a
ndroid.mk
MakeLists.txt
EADME.txt
san_allocator2.cc
san_asm_instrumentation.S
san_dll_thunk.cc
san_globals.cc
san_init_version.h
san_interceptors.cc
san_interceptors.h
san_interface_internal.h
san_internal.h
san_linux.cc
san_mac.cc
san_malloc_linux.cc
san_mapping.h
san_report.cc
san_report.h
san_rtl.cc
san_stats.cc
san_thread.cc
cripts/asan_device_setup
cripts/gen_asm_instrumentation.sh
ests/CMakeLists.txt
ests/asan_asm_test.cc
ests/asan_interface_test.cc
ests/asan_noinst_test.cc
e1e37e8a1e995183df920beca0d4496cc4f3e4d3 14-Jun-2014 Dan Albert <danalbert@google.com> am 5afa96ce: Merge "Exclude Android from the tests for valloc/pvalloc."

* commit '5afa96cef8990f1937faec63182b80bbf58ee986':
Exclude Android from the tests for valloc/pvalloc.
31a5cd83406be83bcdb91df03e16816e3af8c615 14-Jun-2014 Dan Albert <danalbert@google.com> Exclude Android from the tests for valloc/pvalloc.

These functions are being removed from Android because they were removed
from POSIX 2004.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210962 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
c9811bc56f3c7624deec240b22511b6fb0fee5a9 31-May-2014 Stephen Hines <srhines@google.com> am ce888323: am ef4e7891: Merge "Update compiler-rt aosp/master for 3.5 (r209699) rebase."

* commit 'ce888323c994d45668828fd4720617becef7a881':
Update compiler-rt aosp/master for 3.5 (r209699) rebase.
2d1fdb26e458c4ddc04155c1d421bced3ba90cd0 29-May-2014 Stephen Hines <srhines@google.com> Update compiler-rt aosp/master for 3.5 (r209699) rebase.

Change-Id: I158a30186f0faea2e2400e9dfdd878db2eb40e90
ndroid.mk
MakeLists.txt
akefile.mk
san_activation.cc
san_activation.h
san_allocator.h
san_allocator2.cc
san_asm_instrumentation.S
san_blacklist.txt
san_dll_thunk.cc
san_fake_stack.cc
san_fake_stack.h
san_flags.h
san_globals.cc
san_intercepted_functions.h
san_interceptors.cc
san_interceptors.h
san_interface_internal.h
san_internal.h
san_linux.cc
san_mac.cc
san_mac.h
san_malloc_linux.cc
san_malloc_mac.cc
san_malloc_win.cc
san_mapping.h
san_new_delete.cc
san_poisoning.cc
san_poisoning.h
san_posix.cc
san_report.cc
san_report.h
san_rtl.cc
san_stack.cc
san_stack.h
san_stats.cc
san_stats.h
san_thread.cc
san_thread.h
san_win.cc
it_tests/32bitConfig/lit.site.cfg.in
it_tests/64bitConfig/lit.site.cfg.in
it_tests/CMakeLists.txt
it_tests/TestCases/Darwin/interface_symbols_darwin.c
it_tests/TestCases/Darwin/lit.local.cfg
it_tests/TestCases/Darwin/malloc_set_zone_name-mprotect.cc
it_tests/TestCases/Darwin/malloc_zone-protected.cc
it_tests/TestCases/Darwin/reexec-insert-libraries-env.cc
it_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
it_tests/TestCases/Helpers/blacklist-extra.cc
it_tests/TestCases/Helpers/echo-env.cc
it_tests/TestCases/Helpers/init-order-atexit-extra.cc
it_tests/TestCases/Helpers/init-order-pthread-create-extra.cc
it_tests/TestCases/Helpers/initialization-blacklist-extra.cc
it_tests/TestCases/Helpers/initialization-blacklist-extra2.cc
it_tests/TestCases/Helpers/initialization-blacklist.txt
it_tests/TestCases/Helpers/initialization-bug-extra.cc
it_tests/TestCases/Helpers/initialization-bug-extra2.cc
it_tests/TestCases/Helpers/initialization-constexpr-extra.cc
it_tests/TestCases/Helpers/initialization-nobug-extra.cc
it_tests/TestCases/Helpers/lit.local.cfg
it_tests/TestCases/Linux/asan_prelink_test.cc
it_tests/TestCases/Linux/clone_test.cc
it_tests/TestCases/Linux/coverage.cc
it_tests/TestCases/Linux/glob.cc
it_tests/TestCases/Linux/glob_test_root/aa
it_tests/TestCases/Linux/glob_test_root/ab
it_tests/TestCases/Linux/glob_test_root/ba
it_tests/TestCases/Linux/heap-overflow-large.cc
it_tests/TestCases/Linux/heavy_uar_test.cc
it_tests/TestCases/Linux/initialization-bug-any-order.cc
it_tests/TestCases/Linux/interception_failure_test.cc
it_tests/TestCases/Linux/interception_malloc_test.cc
it_tests/TestCases/Linux/interception_readdir_r_test.cc
it_tests/TestCases/Linux/interception_test.cc
it_tests/TestCases/Linux/interface_symbols_linux.c
it_tests/TestCases/Linux/lit.local.cfg
it_tests/TestCases/Linux/malloc-in-qsort.cc
it_tests/TestCases/Linux/malloc_delete_mismatch.cc
it_tests/TestCases/Linux/overflow-in-qsort.cc
it_tests/TestCases/Linux/preinit_test.cc
it_tests/TestCases/Linux/ptrace.cc
it_tests/TestCases/Linux/rlimit_mmap_test.cc
it_tests/TestCases/Linux/swapcontext_test.cc
it_tests/TestCases/Linux/syscalls.cc
it_tests/TestCases/Linux/time_null_regtest.cc
it_tests/TestCases/Linux/tsd_dtor_leak.cc
it_tests/TestCases/Linux/uar_signals.cc
it_tests/TestCases/Linux/unpoison_tls.cc
it_tests/TestCases/Linux/zero-base-shadow32.cc
it_tests/TestCases/Linux/zero-base-shadow64.cc
it_tests/TestCases/SharedLibs/darwin-dummy-shared-lib-so.cc
it_tests/TestCases/SharedLibs/dlclose-test-so.cc
it_tests/TestCases/SharedLibs/init-order-dlopen-so.cc
it_tests/TestCases/SharedLibs/lit.local.cfg
it_tests/TestCases/SharedLibs/shared-lib-test-so.cc
it_tests/TestCases/allocator_returns_null.cc
it_tests/TestCases/allow_user_segv.cc
it_tests/TestCases/asan-symbolize-sanity-test.cc
it_tests/TestCases/assign_large_valloc_to_global.cc
it_tests/TestCases/atexit_stats.cc
it_tests/TestCases/blacklist.cc
it_tests/TestCases/contiguous_container.cc
it_tests/TestCases/current_allocated_bytes.cc
it_tests/TestCases/deep_call_stack.cc
it_tests/TestCases/deep_stack_uaf.cc
it_tests/TestCases/deep_tail_call.cc
it_tests/TestCases/deep_thread_stack.cc
it_tests/TestCases/default_blacklist.cc
it_tests/TestCases/default_options.cc
it_tests/TestCases/dlclose-test.cc
it_tests/TestCases/double-free.cc
it_tests/TestCases/force_inline_opt0.cc
it_tests/TestCases/free_hook_realloc.cc
it_tests/TestCases/global-demangle.cc
it_tests/TestCases/global-overflow.cc
it_tests/TestCases/heap-overflow.cc
it_tests/TestCases/huge_negative_hea_oob.cc
it_tests/TestCases/init-order-atexit.cc
it_tests/TestCases/init-order-dlopen.cc
it_tests/TestCases/init-order-pthread-create.cc
it_tests/TestCases/initialization-blacklist.cc
it_tests/TestCases/initialization-bug.cc
it_tests/TestCases/initialization-constexpr.cc
it_tests/TestCases/initialization-nobug.cc
it_tests/TestCases/inline.cc
it_tests/TestCases/interface_test.cc
it_tests/TestCases/invalid-free.cc
it_tests/TestCases/ioctl.cc
it_tests/TestCases/large_func_test.cc
it_tests/TestCases/log-path_test.cc
it_tests/TestCases/log_path_fork_test.cc.disabled
it_tests/TestCases/lsan_annotations.cc
it_tests/TestCases/malloc_context_size.cc
it_tests/TestCases/malloc_fill.cc
it_tests/TestCases/malloc_hook.cc
it_tests/TestCases/memcmp_strict_test.cc
it_tests/TestCases/memcmp_test.cc
it_tests/TestCases/null_deref.cc
it_tests/TestCases/on_error_callback.cc
it_tests/TestCases/partial_right.cc
it_tests/TestCases/poison_partial.cc
it_tests/TestCases/print_summary.cc
it_tests/TestCases/readv.cc
it_tests/TestCases/sanity_check_pure_c.c
it_tests/TestCases/shared-lib-test.cc
it_tests/TestCases/sleep_before_dying.c
it_tests/TestCases/stack-buffer-overflow-with-position.cc
it_tests/TestCases/stack-frame-demangle.cc
it_tests/TestCases/stack-oob-frames.cc
it_tests/TestCases/stack-overflow.cc
it_tests/TestCases/stack-use-after-return.cc
it_tests/TestCases/strdup_oob_test.cc
it_tests/TestCases/strerror_r_test.cc
it_tests/TestCases/strip_path_prefix.c
it_tests/TestCases/strncpy-overflow.cc
it_tests/TestCases/symbolize_callback.cc
it_tests/TestCases/throw_call_test.cc
it_tests/TestCases/throw_invoke_test.cc
it_tests/TestCases/time_interceptor.cc
it_tests/TestCases/uar_and_exceptions.cc
it_tests/TestCases/unaligned_loads_and_stores.cc
it_tests/TestCases/use-after-free-right.cc
it_tests/TestCases/use-after-free.cc
it_tests/TestCases/use-after-poison.cc
it_tests/TestCases/use-after-scope-dtor-order.cc
it_tests/TestCases/use-after-scope-inlined.cc
it_tests/TestCases/use-after-scope-nobug.cc
it_tests/TestCases/use-after-scope-temp.cc
it_tests/TestCases/use-after-scope.cc
it_tests/TestCases/wait.cc
it_tests/Unit/lit.site.cfg.in
it_tests/lit.cfg
cripts/CMakeLists.txt
cripts/asan_device_setup
cripts/asan_symbolize.py
cripts/gen_asm_instrumentation.sh
ests/CMakeLists.txt
ests/asan_asm_test.cc
ests/asan_fake_stack_test.cc
ests/asan_interface_test.cc
ests/asan_mem_test.cc
ests/asan_noinst_test.cc
ests/asan_oob_test.cc
ests/asan_racy_double_free_test.cc
ests/asan_str_test.cc
ests/asan_test.cc
ests/asan_test_config.h
ests/asan_test_utils.h
e6ce8f93d1891817f3707440f18e54bcef7653dc 21-Feb-2014 Evgeniy Stepanov <eugenis@google.com> Change ASan runtime library name to keep in sync with upstream.

Change-Id: I617132d5b40f6d2e7a7e5ae2c1bf5890f1544093
ndroid.mk
21b5c4df776d34aaa4d1b793b7667aa8353492dd 09-Feb-2014 Stephen Hines <srhines@google.com> Update compiler-rt for merge to 3.4.

Adjust Android.mk for added/removed files:

+ sanitizer_coverage.cc
+ sanitizer_libignore.cc
+ sanitizer_platform_limits_linux.cc
+ sanitizer_platform_limits_posix.cc
- sanitizer_platform_limits_posix.cc
- sanitizer_symbolizer_itanium.cc
+ sanitizer_stacktrace_libcdep.cc
+ sanitizer_stoptheworld_linux_libcdep.cc
+ sanitizer_suppressions.cc
+ sanitizer_symbolizer.cc
- sanitizer_symbolizer_linux.cc
- sanitizer_symbolizer_linux_libcdep.cc
- sanitizer_symbolizer_mac.cc

Change-Id: Ib5cf33dfc36be70f87bca5ec62ee70e29ee2b1ce
ndroid.mk
0a7c7f9f98cdaf562627fac735f115c5b9c872a3 12-Feb-2014 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/release_34' into merge-20140211
7f790caa37ec1c9807c877297d30e040e83ed215 16-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r-196802:
------------------------------------------------------------------------
r196802 | chandlerc | 2013-12-09 11:25:51 -0800 (Mon, 09 Dec 2013) | 11 lines

Revert three patches which were committed without explicit contribution
by their authors.

This may break builds where others added code relying on these patches,
but please *do not* revert this commit. Instead, we will prepare patches
which fix the failures.

Reverts the following commits:
r168306: "[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu"
r168356: "[asan] more support for powerpc, patch by Peter Bergner"
r196489: "[sanitizer] fix the ppc32 build (patch by Jakub Jelinek)"
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_34@197360 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mapping.h
24861607cb3c606ad46e724456eb851558c85330 11-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196802:
------------------------------------------------------------------------
r196802 | chandlerc | 2013-12-09 11:25:51 -0800 (Mon, 09 Dec 2013) | 11 lines

Revert three patches which were committed without explicit contribution
by their authors.

This may break builds where others added code relying on these patches,
but please *do not* revert this commit. Instead, we will prepare patches
which fix the failures.

Reverts the following commits:
r168306: "[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu"
r168356: "[asan] more support for powerpc, patch by Peter Bergner"
r196489: "[sanitizer] fix the ppc32 build (patch by Jakub Jelinek)"
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_34@197011 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mapping.h
b37127085cbcc79f5f859bfab8e7204201c18287 05-Dec-2013 Kostya Serebryany <kcc@google.com> [asan] port r196375 to 3.4

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_34@196478 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
ests/asan_test_utils.h
91dee59b95624ce67c17377ed8b25c575d5ad685 18-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Run one of UAS tests in UAR mode as well

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195015 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/use-after-scope.cc
7214553322c51db3753c8fba0de394b519b7802c 18-Nov-2013 Kostya Serebryany <kcc@google.com> [asan] fix Windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195012 91177308-0d34-0410-b5e6-96231b3b80d8
san_poisoning.cc
2991200255098ac0739952351b2eb2b487819eec 18-Nov-2013 Kostya Serebryany <kcc@google.com> [asan] introduce __sanitizer_annotate_contiguous_container

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195011 91177308-0d34-0410-b5e6-96231b3b80d8
san_poisoning.cc
it_tests/TestCases/contiguous_container.cc
8b0c8a8b6fd2817b0697c255297ca9d48076fcbf 18-Nov-2013 Kostya Serebryany <kcc@google.com> [asan] support __hppa__ (by John David Anglin)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194995 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
3125de9e3048bc505344053d3518cccab7ee6897 17-Nov-2013 Alexey Samsonov <samsonov@google.com> CMake: don't build sanitizer runtimes on 64-bit Windows (it's unsupported for now)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194958 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6a58b0078a94195f963fede873068d7a0982c509 15-Nov-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Make slow unwinder on Linux more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194805 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/double-free.cc
dbd69cc9ccda50efd0305cd0ce9bad50defe4b42 15-Nov-2013 Bob Wilson <bob.wilson@apple.com> Reapply asan coverage changes 194702-194704.

I still don't know what is causing our bootstrapped LTO buildbots to fail,
but llvm r194701 seems to be OK and I can't imagine that these changes could
cause the problem.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194790 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
it_tests/TestCases/Linux/coverage.cc
ae51c273d55fa172908cf940c238eacec0f73223 15-Nov-2013 Bob Wilson <bob.wilson@apple.com> Speculatively revert asan coverage changes 194702-194704.

Apple's bootstrapped LTO builds have been failing, and these changes (along
with llvm 194701) are the only things on the blamelist. I will either reapply
these changes or help debug the problem, depending on whether this fixes the
buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194779 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
it_tests/TestCases/Linux/coverage.cc
e767e350b1a6461bc29cfea28af75f908d7da56e 14-Nov-2013 Dmitry Vyukov <dvyukov@google.com> asan: disable pthread_setname_np interceptor
it does not work anyway and can cause significant slowdown





git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194711 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
68e16eb59c7f654cdb98a2811b3a42612b58a735 14-Nov-2013 Kostya Serebryany <kcc@google.com> [asan] Poor man's coverage that works with ASan (compiler-rt part)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194702 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
it_tests/TestCases/Linux/coverage.cc
8c6e4855ac47415f1f2863690860f24213638cb5 14-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Introduce a top-level target to collect all ASan runtimes and deps

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194696 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
it_tests/CMakeLists.txt
ests/CMakeLists.txt
694d85636b148dfcac37e5c23639baa8fe9abce9 14-Nov-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Add print_summary runtime flag to disable error summaries (UBSan doesn't need them)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194685 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/print_summary.cc
d2e32e323cca83b666ecd124ebfd1720232d0928 13-Nov-2013 Alexander Potapenko <glider@google.com> [ASan] Remove the stale dependency on the Foundation framework from the dynamic ASan runtime.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194583 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
1b17f5b79d58c5aff291dde05727ad0b215b81c6 13-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Do not rely on malloc context in allocator reports.

Invoke a fatal stack trace unwinder when ASan prints allocator-relevant
error reports (double-free, alloc-dealloc-mismatch, invalid-free).
Thus we'll be able to print complete stack trace even if allocation/free
stacks are not stored (malloc_context_size=0).

Based on the patch by Yuri Gribov!


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194579 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
san_malloc_linux.cc
san_malloc_win.cc
san_report.cc
san_report.h
it_tests/TestCases/Linux/malloc_delete_mismatch.cc
it_tests/TestCases/double-free.cc
it_tests/TestCases/invalid-free.cc
ests/asan_noinst_test.cc
348aac42b606dd2d4cec9d68a85bf0144bd7c2f3 13-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Use new feature of FileCheck: provide multiple --check-prefix args

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194578 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/heap-overflow.cc
it_tests/TestCases/large_func_test.cc
it_tests/TestCases/null_deref.cc
it_tests/TestCases/strncpy-overflow.cc
it_tests/TestCases/use-after-free-right.cc
it_tests/TestCases/use-after-free.cc
b527f7de80001569542e3f0ef4c7f4b0cb15cb67 13-Nov-2013 Alexander Potapenko <glider@google.com> [ASan] Don't call __asan_init() from certain interceptors on Darwin.

Fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58994, which hadn't
manifested in LLVM because libclang_rt.asan_osx_dynamic.dylib used to depend on
the Foundation framework.
Without that dependency some interceptors may be called from the system
libraries before libSystem_initializer() is called, which lead to assertion
failures in sanitizer_mac.cc (_NSGetEnviron() returns NULL).

To fix the problem we fall back to the original functions in the common
libsanitizer interceptors and the __cxa_atexit() interceptor on Darwin.

This patch also prints a better error message in the case _NSGetEnviron()
returns NULL.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194573 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ae914e2fc00c60d0f8f8b9b06bcc8b0b2d470181 13-Nov-2013 Kostya Serebryany <kcc@google.com> [asan] fix a leak in tds (https://code.google.com/p/address-sanitizer/issues/detail?id=233)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194572 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
it_tests/TestCases/Linux/tsd_dtor_leak.cc
55c7947a742aa72530eef52d902e60e5571ac3cf 12-Nov-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Specify a default value for each common runtime flag

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194479 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
a537ea99d3dcc4b2dc0033aee7ad5cb1b378efc7 11-Nov-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Warn if interception fails.

This includes a clang-format pass over common interceptors.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194372 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
bb6bc9a0ae534ada3c0c2c226462c351c078d761 11-Nov-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Bypass pthread_attr_getdetachstate interceptor in compiler_rt code.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194369 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
49496747758bf44163768ce3e07e40c8f95ccba9 07-Nov-2013 Alexander Potapenko <glider@google.com> [ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib

CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib

The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code.

The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194199 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
7d4a9553bd3bc43a310e1d13dd699b79f814d77b 06-Nov-2013 Alexander Potapenko <glider@google.com> [ASan] Use OS-specific matches in the malloc_context_size.cc lit test.

The top stack frames for operator new and operator delete are different on Linux and Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194150 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/malloc_context_size.cc
e9e2b7f964413dccf4c724eb9ca39d2686cc29d4 06-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Disable back init-order checker. Make strict_init_order imply check_initialization_order

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194125 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/TestCases/Linux/initialization-bug-any-order.cc
it_tests/TestCases/init-order-atexit.cc
it_tests/TestCases/init-order-dlopen.cc
it_tests/TestCases/init-order-pthread-create.cc
4b9f050c2acab536356342ab96e6cc76c281ac24 06-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Make sure slow stack unwinder doesn't return empty stacks.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194107 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/malloc_context_size.cc
7f80655d8283dbdf77bfee4a849eed4d59e95c7a 01-Nov-2013 Alexey Samsonov <samsonov@google.com> [ASan] Kill use_stack_depot runtime flag and stack trace compression routines.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193868 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_flags.h
san_rtl.cc
ests/asan_noinst_test.cc
2fb08720b11b4c339e191b90d85477c6a2dd74db 01-Nov-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Unify summary reporting across all sanitizers.

This change unifies the summary printing across sanitizers:
now each tool uses specific version of ReportErrorSummary() method,
which deals with symbolization of the top frame and formatting a
summary message. This change modifies the summary line for ASan+LSan mode:
now the summary mentions "AddressSanitizer" instead of "LeakSanitizer".


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193864 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
a96c4dc70efa6e45b27640cdd9812e0817c9a75d 01-Nov-2013 Alexey Samsonov <samsonov@google.com> Consistently use StackTrace::PrintStack in ASan, LSan and MSan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193834 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
2bcd3b547e8de0d152aa41366defb83f3fe766b8 31-Oct-2013 Alexander Potapenko <glider@google.com> [ASan] Make asan_symbolize.py fall back to ASAN_SYMBOLIZER_PATH (which is used when ASAN_OPTIONS=symbolize=1) if LLVM_SYMBOLIZER_PATH is empty.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193758 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
6f5427b0ebc5ced4497f8ef00bd19fc0bd6c33b7 31-Oct-2013 Alexey Samsonov <samsonov@google.com> [ASan] Turn on (non-strict) initialization order checker by default for all ASan users

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193729 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
cc794ab9b8f9066ca7b790ca0dbb197d591e14c4 29-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Maybe fix test failures on lld bots.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193647 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
dfab31b93e954ee42622a13dd79e9e1092346035 29-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Fix build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193635 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
750b4ac400b96153bfe64fc70df3a8d3e2a565a3 29-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Fix build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193634 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
3f8ce73999c1ef82a8a835e9e87b0d4ce8c5810b 29-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] increase the max malloc size from 8Gb to 64Gb

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193615 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
5cf2c460e96e593b1c772f1b02d3a217f4837fdc 29-Oct-2013 Dmitry Vyukov <dvyukov@google.com> tsan/asan: support pthread_setname_np to set thread names



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193602 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
7996a2e2a1c461743c9216f13429c04d75050230 29-Oct-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags to turn on/off the symbolization

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193587 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
f456018a324dc48668a57060f5ac9c838dfd9f32 28-Oct-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Revert r193501 and properly fix r193448

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193522 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
db92faf488988543b18aaac537ac5ee4f4ee68a5 28-Oct-2013 Dmitry Vyukov <dvyukov@google.com> asan/msan: separate different report blocks with new lines

this makes the reports consistent with tsan, and much more readable.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193520 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
e38046aae1f76e525c2466af20c27269185a37bf 27-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Work around ASan/Win breakage by r193448

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193501 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
7e8db745c56f7f9317f0d3472bf01bd48ca3424b 26-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Add a CMake option COMPILER_RT_DEBUG for building runtimes with full debug info.

Differential Revision: http://llvm-reviews.chandlerc.com/D1984

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193449 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/malloc-in-qsort.cc
it_tests/TestCases/memcmp_test.cc
it_tests/TestCases/strncpy-overflow.cc
c1a1ed62228288155459d39194995a36aca4a8a6 26-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Overhaul the symbolizer interface.

This moves away from creating the symbolizer object and initializing the
external symbolizer as separate steps. Those steps now always take place
together.

Sanitizers with a legacy requirement to specify their own symbolizer path
should use InitSymbolizer to initialize the symbolizer with the desired
path, and GetSymbolizer to access the symbolizer. Sanitizers with no
such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for
initialization.

The symbolizer interface has been made thread-safe (as far as I can
tell) by protecting its member functions with mutexes.

Finally, the symbolizer interface no longer relies on weak externals, the
introduction of which was probably a mistake on my part.

Differential Revision: http://llvm-reviews.chandlerc.com/D1985

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193448 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_report.cc
san_rtl.cc
e236dbb5e558b174609d2d13e80685d488c129d8 25-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Intercept pthread_attr_get*.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193405 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
53177247698bfba075f2d5b255a447fc3ced6976 24-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Introduce an operator new for LowLevelAllocator, and convert most users to it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193308 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_thread.cc
a412f485298901a6cbf9d5d7489e834efebc9483 23-Oct-2013 Alexey Samsonov <samsonov@google.com> [ASan] ASan can be combined with LSan and UBSan, so export symbol from them as well.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193245 91177308-0d34-0410-b5e6-96231b3b80d8
san.syms.extra
4b861aa4b40daabd81fdaed352380ea1c486053a 23-Oct-2013 Nick Lewycky <nicholas@mxc.ca> Make sure ASan always emits an error summary if it reports an error.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193229 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
9b5f95f5fe1a24be4dfb7436b64cb0e0f8c00535 20-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Runtime support for the indirect function call checker.

Differential Revision: http://llvm-reviews.chandlerc.com/D1339

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193060 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
547f9dd4c0302fe9a571e1811a4a92dd82ef89f6 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] fix stack trace printing on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192990 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
1fe68b87dcd9be36b5b4d35e74cc5b0666500ec4 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] allocate AsanThreadContext using LowLevelAllocator instead of mmap to save space

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192980 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
6d95869fa900da9ddd68e15e2aa065854cfa176b 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] reduce the size of AsanThreadContext by storing the stack trace in the stack depot

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192979 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_stack.cc
san_stack.h
san_thread.cc
san_thread.h
34fb715374de8f6af2c36275ba4dd2dbc7e7b5ea 18-Oct-2013 Alexander Potapenko <glider@google.com> [ASan] fix compilation of atexit_stats.cc on OSX


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192973 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/atexit_stats.cc
00dc24362d11540c39d57d27de846ce5823110cd 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] fix a test on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192960 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/assign_large_valloc_to_global.cc
a2e70d92b67703effb631d7b4db8979fd74d5db5 18-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] fix atexit stats

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192956 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/TestCases/assign_large_valloc_to_global.cc
it_tests/TestCases/atexit_stats.cc
8e22b68ce64e34d3fc90f02d967bcceb279f3302 17-Oct-2013 Alexander Potapenko <glider@google.com> [ASan] fix assign_large_valloc_to_global.cc to use the correct header for valloc() on OSX.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192901 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/assign_large_valloc_to_global.cc
13521a267f509a06e92baa154947b9d2cde0eed8 17-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192892 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/TestCases/deep_call_stack.cc
8fa4edcb169ab77355c77e065fc5387085787a8a 17-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] Fix a deadlock between asan's allocator and lsan

Summary:
This fixes a deadlock which happens in lsan
on a large memalign-allocated chunk that resides in lsan's root set.

Reviewers: samsonov, earthdok

Reviewed By: earthdok

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1957

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192885 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
it_tests/TestCases/assign_large_valloc_to_global.cc
782cbdca4e926cb7b640d194531a07c431990ee3 17-Oct-2013 Will Dietz <wdietz2@illinois.edu> Use configured PYTHON in asan lit tests.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192870 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
cca8e781e5353cba810a0ec3a814ddde2c4934e7 16-Oct-2013 Kostya Serebryany <kcc@google.com> [asan] introduce run-time flag 'poison_partial'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192793 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_flags.h
san_poisoning.h
san_rtl.cc
it_tests/TestCases/poison_partial.cc
0f63831345e26b23d85a67e2dd96129f48eec477 16-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Remove CallocOverflow32 test from asan_test.

The same as with MSan, this test behavior depends on ASAN_OPTIONS, and we've
got a lit_test that covers this.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192777 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
6866dba92ac842fc513ba339ba849a953ffb7507 15-Oct-2013 Dmitry Vyukov <dvyukov@google.com> tsan: move verbosity flag to CommonFlags



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192701 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_flags.h
san_interceptors.cc
san_mac.cc
san_poisoning.cc
san_posix.cc
san_rtl.cc
san_thread.cc
97f4e082ff0f6aa13ef9e30cd611c1e9246ca7a6 15-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192685 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/allocator_returns_null.cc
79f11fca3a617e59131832d7dfdcc36cb942a300 15-Oct-2013 Alexey Samsonov <samsonov@google.com> [ASan] Make test from r192581 Linux-only, as wild memory contents is less predictable on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192677 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/heap-overflow-large.cc
it_tests/TestCases/heap-overflow-large.cc
c519335c2d6d32acaac32c0595f08a05081567e7 14-Oct-2013 Sergey Matveev <earthdok@google.com> [lsan] Support ASan's stack-use-after-return mode in LSan.

Treat the fake stack as live memory.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192593 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_thread.cc
e86e35fbe861e73c5991200510a028877427b3e7 14-Oct-2013 Sergey Matveev <earthdok@google.com> [asan] Improve thread lifetime tracking on POSIX systems.

Call AsanThread::Destroy() from a late-running TSD destructor.
Previously we called it before any user-registered TSD destructors, which caused
false positives in LeakSanitizer.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192585 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_posix.cc
san_rtl.cc
san_thread.cc
san_thread.h
san_win.cc
d9def29fe0dc8fc70ef270dcc1a266ad9257ec1f 14-Oct-2013 Alexey Samsonov <samsonov@google.com> [ASan] Don't die with internal ASan error on large buffer overflows

Summary:
Out-of-bound access may touch not-yet allocated or already freed
and recycled from quarantine chunks. We should treat this situation as
a "free-range memory access" and avoid printing any data about that
irrelevant chunk (which may be inconsistent).

This should fix https://code.google.com/p/address-sanitizer/issues/detail?id=183

Reviewers: kcc

Reviewed By: kcc

CC: timurrrr, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1893

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192581 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
san_report.cc
it_tests/TestCases/heap-overflow-large.cc
it_tests/TestCases/null_deref.cc
80175018541984bdcfe6a304bb189bd30592fa8a 12-Oct-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Turn GetStackTrace() into StackTrace::Unwind()

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192533 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.h
90b0f1e3ba126bb2e92ab51ef379c98782c23d90 04-Oct-2013 Alexey Samsonov <samsonov@google.com> Refactor the usage of strip_path_prefix option and make it more consistent across sanitizers

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191943 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_stack.cc
8cde99fb9df913aaf7c1715cd134110dd5a15834 03-Oct-2013 Dmitry Vyukov <dvyukov@google.com> asan/msan: fix "unused function 'OnExit'" warning


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191904 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
14dd980b384ad859099b499e12f320c4791fb674 03-Oct-2013 Dmitry Vyukov <dvyukov@google.com> asan/msan/tsan: move _exit interceptor to common interceptors



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191903 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
e1c68c319a0113be832da17a777892353a8b5f23 27-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] introduce run-time flag uar_stack_size_log to control the size of FakeStack; don't crash when the fake stack is exhausted, move some code to .cc file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191510 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_flags.h
san_rtl.cc
san_thread.cc
it_tests/TestCases/stack-use-after-return.cc
ests/asan_fake_stack_test.cc
6186bfc81d988b650d2acad44bcde00fda799818 24-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Fix GCD tests by spinning forever in the main thread.
Since the error is always reported by one of the GCD workers, this will help avoid premature program termination with exit code 0.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191294 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_mac_test_helpers.mm
cf2cabb752ffeff152ed471fa407a415c404d6e4 23-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] remove -fsanitize=use-after-return from the tests (this flag now comes with asan by default)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191204 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/heavy_uar_test.cc
it_tests/TestCases/Linux/uar_signals.cc
it_tests/TestCases/deep_call_stack.cc
it_tests/TestCases/stack-use-after-return.cc
it_tests/TestCases/uar_and_exceptions.cc
ests/CMakeLists.txt
a8b8e964d7b94cae465df77642465901b1b3079d 23-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan/Win] Slightly optimize the DLL thunk

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191190 91177308-0d34-0410-b5e6-96231b3b80d8
san_dll_thunk.cc
def895b9ed81b37a99660a2ddfc2c45d229000a4 23-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Fix a compile-time warning

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191189 91177308-0d34-0410-b5e6-96231b3b80d8
san_dll_thunk.cc
san_win.cc
c11fa095b344c1423ba76822d5bde122b1676223 23-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Add DLL thunks for the new stack UAR interface

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191188 91177308-0d34-0410-b5e6-96231b3b80d8
san_dll_thunk.cc
san_win.cc
f5ebc6a911416846c1b181beb62a3cc9e2988cdf 23-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Fix the interface test on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191187 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Darwin/interface_symbols_darwin.c
b0796022fb8f47939696b2e57c17e1603eda1f9d 23-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] disable the detect_stack_use_after_return run-time flag by default and enable it explicitly in tests. This is done in preparation to enabling the -fsanitize=use-after-return compile-time flag by default when -fsanitize=address is present.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191184 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/TestCases/Linux/heavy_uar_test.cc
it_tests/TestCases/stack-use-after-return.cc
6c70a55a52827b2415263a0be2767672a703cd63 20-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Remove a complex multiline comment that baffles lint.
That comment is repeated in another function below.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191085 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
b812253202f2db9d60a543b22226064d1ed20279 20-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Fix compilation of asan_str_test.cc on non-Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191083 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_str_test.cc
d4d7040ee026ab04502c42327ed5081f704a8e3c 20-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Enforce the memmove semantics for both memcpy() and memmove() interceptors on Darwin.

Due to bugs in the interposition of resolver functions on 10.7 and 10.8 both memcpy() and memmove()
were previously intercepted by INTERCEPTOR(memcpy), which led to false positives and crashes (see http://llvm.org/bugs/show_bug.cgi?id=16362)
We choose to use a memmove-like function in both cases. This effectively disables the overlap checks in memcpy(), but the overlaps
aren't possible in practice, because memcpy() and memmove() are the same function on Darwin.

Once the interposition is fixed in 10.9, we'll need to revisit this issue, see https://code.google.com/p/address-sanitizer/issues/detail?id=226


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191081 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ests/asan_str_test.cc
81b0fe0ae241ca12882f653dcf6b13eaa5ca284d 20-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] nuke yet another async-signal-safety bug in UAR (oh, my)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191080 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.h
san_thread.h
b928ac1b61c35ef961f841ce44fc6b166362b8a2 19-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Fix init-order-dlopen.cc test to not depend on the -Wl,-undefined,dynamic_lookup being passed to the linker.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191012 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/SharedLibs/init-order-dlopen-so.cc
it_tests/TestCases/init-order-dlopen.cc
621770a196153ee61b338d34bafd1170c1899444 19-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] fix one more async-signal-safety issue with use-after-return

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191004 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
san_thread.h
230e52f4e91b53f05ce19dbbf11047f4a0113483 18-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] add a run-time option detect_stack_use_after_return, add verbosity output for fake stack

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190932 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_flags.h
san_interface_internal.h
san_rtl.cc
san_thread.cc
san_thread.h
it_tests/TestCases/stack-use-after-return.cc
608609429a2202e0342c13bc037368c8d678591c 17-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Don't add SANITIZER_INTERFACE_ATTRIBUTE for internal ASan functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190860 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
san_mapping.h
46817813bcbd9a74429e36f1d423b55caed4efd2 17-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Enable fake stack test on Mac and Android, as no-instrumentation tests are now fixed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190856 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
5d9d807a9d82b566387e3064882a87cb8fd4ef22 17-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Link tests with -pie if ASan runtime uses zero-base shadow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190853 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
b388987bf988435ee87dc4848ea8e62ebfa942eb 17-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] further speedup use-after-return: simplify deallocation of fake frames. ~ 20% speedup.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190852 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
ests/asan_fake_stack_test.cc
382bbc80dc7a93a28b565b62b383b904fc1205a4 16-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Don't link with pthread on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190794 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
05fa3808f6ac96023cdf583a1a1b7220e5b451b8 16-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Split ASan unit tests into two different binaries:

(1) instrumented, i.e. compiled and linked with -fsanitize=address
(2) not instrumented, compiled w/o -fsanitize=address and linked with ASan runtime statically.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190788 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
ests/asan_interface_test.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
22e21b044c9337a2fa921f268b7d221c693ad78b 16-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Check that getSymbolizer() is defined. Turn magic mapping constants into named variables

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190787 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
san_report.cc
san_rtl.cc
ff64012e04faede5eaecd68db0edd86e8b15853c 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] Android does not have TLS

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190669 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
9c59ca89870cd82a1a13e5daf381951bfacba203 13-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Temporary disable UAR unit test on Android due to https://code.google.com/p/address-sanitizer/issues/detail?id=222

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190667 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
0f2283742e1d37ebf0c5ac034dab704a7d9af099 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] don't record the class_id in FakeFrame (scratching the last bits of performance)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190666 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
ests/asan_fake_stack_test.cc
dff16d41223d2df3762ba64a0a529c5e475de34f 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] more performance to FakeStack: a) don't used atomic exchange, instead rely on regular load and store and other signal-safe logic; b) remove allocated_from_size_class_mask_ which is not helping much anyway; Another 10% speedup

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190664 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
9433af375c7813486be91d2ac76f5072ee41818d 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] second attempt to use TLS with fake stack. This time it looks (more) async-signal safe.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190663 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_thread.cc
san_thread.h
b8a903c18120f40cc09aac3c28c1214a0ffceda7 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] undo the previous commit since TLS hack breaks with signals... :(

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190662 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
6147f02a9116a79b608b9ef547ccca51c70bffe2 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] use TLS on Linux to get the FakeStack. Saves 15% performance

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190661 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
8f7ec32eb34fb051f22e10b228ac056f919c4284 13-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] inline PoisonShadow in FakeStack to get ~10% speedup

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190660 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
b1173c27c2791aef27304e68911a11648401064d 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] a bit of performance improvement in fake stack, generalized one test, fixed android build of another test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190606 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
it_tests/TestCases/uar_and_exceptions.cc
ests/asan_fake_stack_test.cc
89de457bd3ec40d38bc7860f88f1d4da473eacc4 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] add a test for use-after-return and exceptions and fix it. Not 100% sure this is a complete fix, will keep looking for harder cases.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190603 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_rtl.cc
it_tests/TestCases/uar_and_exceptions.cc
bdd9545da55933797edf58c6049d894ed0efb465 12-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Do not build asan_fake_stack_test.cc on OSX until https://code.google.com/p/address-sanitizer/issues/detail?id=222 is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190597 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
3b37dd4655ca0c501e76916ba7411d8d7a6ae7fd 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] limit the size of the fake stack with a reasonable constant. This fixes a failure when the main thread's stack is considered unlimited (very large).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190596 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.h
b39a604ff9d68ba7400197fca341771878443a69 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] (part 2) don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190594 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
dcf98bf49d68533c7aebadbf6c4467afdd486c99 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190593 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
san_thread.h
c98fc1f8e52812cfaf5b19a29db5ed56acb0a682 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] hopefully make the FakeStack async-signal safe, enable the related test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190592 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_thread.cc
san_thread.h
it_tests/TestCases/Linux/uar_signals.cc
it_tests/TestCases/stack-use-after-return.cc
96a575f05b2a45774170a118ea69ddae3659b645 12-Sep-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Fix deadlock in stack unwinder on android/x86.

Fixes PR17116.
Patch by 林作健 (manjian2006 at gmail.com).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190590 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.h
san_thread.h
86b88b80bdb7ea9a265f8946e7918bcc388abceb 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] use xchg instead of CAS in FakeStack::Allocate (5% faster for this case)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190589 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
ac3ae5dc29d3623ada2bcb0db22ee88b0382e3b1 12-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] fully re-implement the FakeStack (use-after-return) to make it faster and async-signal-safe. The implementation is not yet complete (see FIXMEs) but the existing tests pass.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190588 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_report.cc
san_thread.h
ests/CMakeLists.txt
ests/asan_fake_stack_test.cc
9213e07a7f95b3e634b97a7bba70849badcf2c8a 10-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Remove the explicit function prototypes for intercepted functions on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190411 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
7847d77b246635211c3bf465421d49d7af5226c1 10-Sep-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Refactor symbolization interface: use class instead of several functions. Move some code around to get rid of extra source files

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190410 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_rtl.cc
34e3ed1db94c5ce9784d7ffb8d66a54cf523e09c 10-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] refactor the use-after-return API so that the size class is computed at compile time instead of at run-time. compiler-rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190406 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_interface_internal.h
san_rtl.cc
it_tests/TestCases/Linux/interface_symbols_linux.c
ests/asan_noinst_test.cc
997454a41a1658837d72d69ec7def59616311243 10-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Don't crash in DescribeHeapAddress if we don't know the current thread's ID

Also make DescribeThread easier to use.
This was firing on Dr.ASan runs, not sure how to repro InvalidTID in a simple test.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190392 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
d9a5e243254764ab1024320ef34bc2a87180f4c5 09-Sep-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Fix PR17138.

strerror_r on OSX returns a positive error code when the errno value is
unknown. Buffer contents are initialized in any case.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190295 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/strerror_r_test.cc
4f78b354034f4b6826a59733d774f558ca1eab89 08-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix one more memory leak in test case

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190277 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/free_hook_realloc.cc
1a249181dcdf217d368fbf4c1f09d8af7e617cb0 08-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] turn on leak checking for ASan tests and fix a few discovered leaks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190274 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/glob.cc
it_tests/TestCases/Linux/interception_readdir_r_test.cc
it_tests/Unit/lit.site.cfg.in
it_tests/lit.cfg
ests/asan_noinst_test.cc
ests/asan_str_test.cc
639df402c4925acd3ea7bebff729a535e3f79964 06-Sep-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] A bunch of linux system call handlers.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190157 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/syscalls.cc
0b2c3a79bbcba15bb973f8199bbd7052b43f548c 06-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] make the check for NULL more portable.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190139 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/allocator_returns_null.cc
e9e4f04e8320d35ab19dfb8688a7bdd3e5ae7cbb 06-Sep-2013 Alexey Samsonov <samsonov@google.com> Fix compiler warning introduced in r190022

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190137 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_str_test.cc
f7f2e431263cc0aa321218ce8978b289187a39a3 06-Sep-2013 Alexey Samsonov <samsonov@google.com> Migrate ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS to new spelling - ATTRIBUTE_NO_SANITIZE_ADDRESS

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190136 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
48b7ee943e01a206600b0189e6b2b0125c4dd1d1 06-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] make calloc crash instead of returning 0 on overflow (controlled by the allocator_may_return_null flag)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190128 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
it_tests/TestCases/allocator_returns_null.cc
ests/asan_noinst_test.cc
9150f397ba4c5478275d72665ea3e53a84c7076a 06-Sep-2013 Kostya Serebryany <kcc@google.com> [sanitizer] make the allocator crash instead of returning 0 on huge size (controlled by the allocator_may_return_null flag)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190127 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
it_tests/TestCases/allocator_returns_null.cc
ests/asan_test.cc
b99228de65b408b0acd9618b92774fb8add7e482 05-Sep-2013 Reid Kleckner <reid@kleckner.net> asan: Add a wcslen interceptor mirroring strlen

Tested on Linux, since I can't build the tests on Windows yet.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190022 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
ests/asan_str_test.cc
ed2364bb49e9ad1866320e02b0f004b97907052a 04-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] add a test that demonstrates why the current use-after-return is not signal-safe

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189943 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/uar_signals.cc
73dc36ea7dd04a2ea52ffae91670913731de209a 04-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] make use-after-return handle very deep recursion; fixes 483.xalancbmk in UAR mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189929 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
it_tests/TestCases/deep_call_stack.cc
22917e961033a840c500761d3c7110b5a654fca4 03-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> [asan] Hopefully fix the RTL build on Windows (part 2)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189817 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
89fe5642529335dc5d13ce7f4e61bdea36fca508 03-Sep-2013 Kostya Serebryany <kcc@google.com> [asan] attemping to fix the Windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189814 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
edb39c7942fc9fe5043b7cce348bac0aec4c83eb 03-Sep-2013 Kostya Serebryany <kcc@google.com> implement PR17059: more visible diagnostics for stack-buffer-overflow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189806 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
it_tests/TestCases/stack-buffer-overflow-with-position.cc
it_tests/TestCases/stack-use-after-return.cc
650c7d44b659ddfb4af471dc2ad79a727b7de939 03-Sep-2013 Sergey Matveev <earthdok@google.com> [lsan] Colorize LSan reports.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189804 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
68c016aea0b61f649b9d9ba65c7d7217e0c0f6cb 03-Sep-2013 Alexey Samsonov <samsonov@google.com> ASan, LSan, MSan: try to find llvm-symbolizer binary in PATH if it is not provided. Now we don't need to explicitly set the location of llvm-symbolizer in lit test configs.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189801 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/lit.cfg
696902ad6f427ce37b5f64a84a9cd53162f09abf 03-Sep-2013 Kostya Serebryany <kcc@google.com> fix PR17061 (and pleeease, don't ask me for a test, this is just a minor output formatting issue :)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189783 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
dcf154d08f770f7b683ebe58c80603029a773c68 02-Sep-2013 Alexey Samsonov <samsonov@google.com> [ASan] Make blacklist test more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189748 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/blacklist.cc
717ece58e18190c4aef50bd16254db1d74036395 02-Sep-2013 Alexey Samsonov <samsonov@google.com> Improve collecting malloc stats in ASan

Summary:
This change makes races between updates of thread-local stats and
merging all the thread-local stats together less harmful.

Reviewers: kcc

Reviewed By: kcc

CC: dvyukov, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1572

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189744 91177308-0d34-0410-b5e6-96231b3b80d8
san_stats.cc
san_stats.h
san_thread.cc
it_tests/TestCases/current_allocated_bytes.cc
6102afb6651a43f6fa3c66810e321e464aff1172 28-Aug-2013 Kostya Serebryany <kcc@google.com> [asan]: fix a CHECK failure in use-after-return mode; enable and fix stack-use-after-return.cc; add a test for UAR mode in asan_noinst_test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189457 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
it_tests/TestCases/stack-use-after-return.cc
ests/asan_noinst_test.cc
544bdfb538d082109194952ce66907b917eb8d51 28-Aug-2013 Alexey Samsonov <samsonov@google.com> Generate list of symbols exported from sanitizer runtimes only on 64-bit Unix

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189454 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
e5fa243b20bf5e6a097bc58cbedfe6bed8a9b7d1 27-Aug-2013 Alexey Samsonov <samsonov@google.com> Properly generate lists of exported symbols for sanitizer runtimes

This change adds a Python script that is invoked for
the just-built sanitizer runtime to generate the list of exported symbols
passed to the linker. By default, it contains interceptors and sanitizer
interface functions, but can be extended with tool-specific lists.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189356 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san.syms
san.syms.extra
c1f1af715b204a7be6e31754169c358edb392bb2 27-Aug-2013 Hans Wennborg <hans@hanshq.net> cmake: fix the compiler-rt build with MSVC

This sets flags and excludes things that aren't working with MSVC yet,
allowing us to build the ASan runtime as part of the cmake build.

Differential Revision: http://llvm-reviews.chandlerc.com/D1525

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189304 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
13f5be4dd1d8bf6a44d8d976325f1c6f26fa9f7f 16-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan/RTL] Disable colored reporting on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188545 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
a0e78c9dbd9cc27aebf765cc69a1158df5a05bb9 16-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan/RTL] Disable alloc_dealloc_mismatch by default on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188541 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
e274841d866cde3d393f643632bf67d59469430e 13-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan/Win] Oops, forgot to add the attributes to the memory allocations functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188290 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_win.cc
43e62df906327f6ffa492edb933af1195143d149 13-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan/Win] Hook some memory allocation functions; passes simple sanity test now

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188278 91177308-0d34-0410-b5e6-96231b3b80d8
san_dll_thunk.cc
68cd60c77470fd6e0f86bad1e4c68796d516cc06 13-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan/Win] Add the first version of the RTL thunk that should be linked with instrumented DLLs

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188267 91177308-0d34-0410-b5e6-96231b3b80d8
san_dll_thunk.cc
3c80c6c574850106481f82b9e23d1c728458d4a9 13-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188261 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
san_interface_internal.h
san_report.cc
san_rtl.cc
san_stack.cc
e18e3f07802c420eb4b2da407e148084b75cecc9 12-Aug-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Intercept poll/ppoll.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188177 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
a1b15b4af39b843ebb8545d295aa872829eb8187 10-Aug-2013 Daniel Dunbar <daniel@zuster.org> [tests] Update to use lit_config and lit package, as appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188116 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/32bitConfig/lit.site.cfg.in
it_tests/64bitConfig/lit.site.cfg.in
it_tests/Unit/lit.site.cfg.in
it_tests/lit.cfg
6793ea5a9b2b75bb424df38fae3abf6dec7defcd 09-Aug-2013 Stephen Hines <srhines@google.com> Merge commit '653e4526c70eb3d47780ed57553bc41c4b3cc1d6' into merge-20130807
82821fa64c3f0571a18adc1aa7cbadaba2a5e5e2 08-Aug-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] ASan/MSan tests for r187967.

r187967: Disable inlining between sanitized and non-sanitized functions.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187971 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/inline.cc
ead14cf28f1d2684c6197b569cb812774dc6cbcd 07-Aug-2013 Alexey Samsonov <samsonov@google.com> ASan: fix one more test case for pipefail

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187881 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Darwin/malloc_zone-protected.cc
244a8e02f5c99a62f0c92cf854b859f34ca1d8b5 07-Aug-2013 Alexey Samsonov <samsonov@google.com> Distinguish 32-bit ASan from 64-bit ASan in lit configs

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187878 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
f2366a95ae2b54569bf556c11580a14481f8700f 07-Aug-2013 Alexey Samsonov <samsonov@google.com> Enable pipefail for ASan tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187877 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/heavy_uar_test.cc
it_tests/TestCases/Linux/initialization-bug-any-order.cc
it_tests/TestCases/Linux/interception_malloc_test.cc
it_tests/TestCases/Linux/interception_test.cc
it_tests/TestCases/Linux/malloc-in-qsort.cc
it_tests/TestCases/Linux/malloc_delete_mismatch.cc
it_tests/TestCases/Linux/overflow-in-qsort.cc
it_tests/TestCases/Linux/ptrace.cc
it_tests/TestCases/Linux/rlimit_mmap_test.cc
it_tests/TestCases/Linux/syscalls.cc
it_tests/TestCases/Linux/zero-base-shadow32.cc
it_tests/TestCases/Linux/zero-base-shadow64.cc
it_tests/TestCases/allow_user_segv.cc
it_tests/TestCases/asan-symbolize-sanity-test.cc
it_tests/TestCases/deep_stack_uaf.cc
it_tests/TestCases/deep_tail_call.cc
it_tests/TestCases/deep_thread_stack.cc
it_tests/TestCases/double-free.cc
it_tests/TestCases/global-demangle.cc
it_tests/TestCases/global-overflow.cc
it_tests/TestCases/huge_negative_hea_oob.cc
it_tests/TestCases/init-order-atexit.cc
it_tests/TestCases/initialization-bug.cc
it_tests/TestCases/invalid-free.cc
it_tests/TestCases/ioctl.cc
it_tests/TestCases/memcmp_strict_test.cc
it_tests/TestCases/memcmp_test.cc
it_tests/TestCases/on_error_callback.cc
it_tests/TestCases/partial_right.cc
it_tests/TestCases/readv.cc
it_tests/TestCases/sanity_check_pure_c.c
it_tests/TestCases/shared-lib-test.cc
it_tests/TestCases/sleep_before_dying.c
it_tests/TestCases/stack-frame-demangle.cc
it_tests/TestCases/stack-oob-frames.cc
it_tests/TestCases/stack-overflow.cc
it_tests/TestCases/strdup_oob_test.cc
it_tests/TestCases/strip_path_prefix.c
it_tests/TestCases/symbolize_callback.cc
it_tests/TestCases/time_interceptor.cc
it_tests/TestCases/unaligned_loads_and_stores.cc
it_tests/TestCases/use-after-poison.cc
it_tests/TestCases/use-after-scope-dtor-order.cc
it_tests/TestCases/use-after-scope-inlined.cc
it_tests/TestCases/use-after-scope.cc
it_tests/TestCases/wait.cc
it_tests/lit.cfg
41f15402521b7af66c2aa8e0ad4a056fc8166dd9 01-Aug-2013 Sergey Matveev <earthdok@google.com> [lsan] Add leak_check_at_exit flag.

We needed a way to tell LSan to invoke leak checking only if __do_leak_check()
is called explicitly. This can now be achieved by setting
leak_check_at_exit=false.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187578 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
103e5b744497fdc57be9efe5e6ef40a896736993 30-Jul-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Limit fake stack size to a reasonable value when running with unlimited stack.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187411 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
0738e2f85ca6896fcd980d7752f55651744eb08c 27-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> disable pipefail on asan for now.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187269 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
62519eb72ec1005d794685c1ec09df7c37631b27 22-Jul-2013 Sergey Matveev <earthdok@google.com> [lsan] Make __lsan_do_leak_check() honor the detect_leaks flag.

Also move detect_leaks to common flags.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186821 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
f021f4fb9e41d7ff3368556962c89119391fe025 18-Jul-2013 Hans Wennborg <hans@hanshq.net> Use --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186607 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
2ec879ebd7261c9182d4fdee95fb615439dda67d 18-Jul-2013 Alexey Samsonov <samsonov@google.com> [ASan] Fix leaks in ASan tests found by LSan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186577 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
67505a8a0cf9621243ed21b67dfa041224c78e4b 16-Jul-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] move strcpy and strncpy to common interceptors

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186408 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
bb7f2d880c843dd5ee1c5e53d2517f7ca9058e66 16-Jul-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Use less shadow on Win 32-bit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186393 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
31f78fda9c511f9ab4afc3494f54cb24450e28e6 16-Jul-2013 Alexander Potapenko <glider@google.com> [ASan] Cache the OSX version to avoid calling sysctl() on every GetMacosVersion() call.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186389 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_mac.h
ad2ae5464b3c0f947f72908671ba1e6d753855a5 16-Jul-2013 Alexander Potapenko <glider@google.com> [ASan] Add support for OS X Mavericks to GetMacosVersion.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186386 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_mac.h
eaca82cf249021afa31dbc970278f2f28ea2a1aa 15-Jul-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix check_lint warnings in sanitizers' runtime libraries

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186328 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
5a482cd54a75bf821fb8c61f2fe4e84ae9efb714 11-Jul-2013 Chandler Carruth <chandlerc@gmail.com> Fix a veritable conucopia of bugs in the readdir_r interceptors.

First, the reason I came here: I forgot to look at readdir64_r which had
the exact same bug as readdir_r. However, upon applying the same
quick-fix and testing it I discovered that it still didn't work at all.
As a consequence, I spent some time studying the code and thinking about
it and fixed several other problems.

Second, the code was checking for a null entry and result pointer, but
there is no indication that null pointers are viable here. Certainly,
the spec makes it extremely clear that there is no non-error case where
the implementation of readdir_r fails to dereference the 'result'
pointer and store NULL to it. Thus, our checking for a non-null 'result'
pointer before reflecting that write in the instrumentation was
trivially dead. Remove it.

Third, the interceptor was marking the write to the actual dirent struct
by looking at the entry pointer, but nothing in the spec requires that
the dirent struct written is actually written into the entry structure
provided. A threadlocal buffer would be just as conforming, and the spec
goes out of its way to say the pointer to the *actual* result dirent
struct is stored into *result, so *that* is where the interceptor should
reflect a write occuring. This also obviates the need to even consider
whether the 'entry' parameter is null.

Fourth, I got to the bottom of why nothing at all worked in readdir64_r
-- the interceptor structure for dirent64 was completely wrong in that
it was the same as dirent. I fixed this struct to be correct (64-bit
inode and 64-bit offset! just a 64-bit offset isn't enough!) and added
several missing tests for the size and layout of this struct.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186109 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/interception_readdir_r_test.cc
d26cb23c22c1330e1cce383180818f4c3dcc7d18 10-Jul-2013 Chandler Carruth <chandlerc@gmail.com> Fix a bug in the readdir_r interceptor: when we reach the end of the
directory stream, the entry is not written to, instead *result is set to
NULL and the entry is not written to at all.

I'm still somewhat suspicious of the correct instrumention here --
I feel like it should be marking the written range as the pointer in
*result and the length (*result)->d_reclen in case the implementation
decides not to use the passed-in entry (if that's even allowed).
Finally, the definition of 'struct dirent' analog used in the
interceptor is wrong in 32-bit mode with _FILE_OFFSET_BITS=64 as it hard
codes the use of a pointer-sized offset.

I've added a somewhat goofy test for the bug I fixed via ASan --
suggestions on how to better test the interceptor logic itself welcome.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185998 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/interception_readdir_r_test.cc
d907702719a9bc7a86490cd4a4c706959607ca4d 10-Jul-2013 Peter Collingbourne <peter@pcc.me.uk> [asan] Update blacklists to use categories.

Differential Revision: http://llvm-reviews.chandlerc.com/D1094

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185980 91177308-0d34-0410-b5e6-96231b3b80d8
san_blacklist.txt
it_tests/TestCases/Helpers/initialization-blacklist.txt
3fa122e6a8e12db6583793861f6cf776fe1c98a0 09-Jul-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Support GLOB_ALTDIRFUNC in glob interceptor.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185932 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
12eb79dd701d9d40551759330a9257316601373b 09-Jul-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Intercept realpath and canonicalize_file_name.

Handle realpath(path, NULL) form.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185921 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ae4e6fd0300b13812a02a779619b1a451478cdd1 09-Jul-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Fix windows build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185917 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
c6ac98d7fcc81768b2ef7ddc785c27e3fc1bdef6 08-Jul-2013 Sergey Matveev <earthdok@google.com> [lsan] Handle fork() correctly.

Update the main thread's os_id on every pthread_create, and before
initiating leak checking. This ensures that we have the correct os_id even if we
have forked after Init().

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185815 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_thread.cc
san_thread.h
2e6a1fb50f0252b673c37a272773a83508d4f927 04-Jul-2013 Alexander Potapenko <glider@google.com> [ASan] Close stderr before launching atos in asan_symbolize.py


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185631 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
e1f1661581889fb2fdd9a33f83cba414ea529294 04-Jul-2013 Alexander Potapenko <glider@google.com> [ASan] Do not protect the malloc zone created by malloc_zone_create() on Snow Leopard and earlier systems.
Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=208


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185621 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
b9a928497168e177791f10f5042ff6f5e4e8a881 01-Jul-2013 Alexey Samsonov <samsonov@google.com> [ASan] try to fix Windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185345 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
9465cbdbe73590746b57916f46ea1aa4bf3dd13d 01-Jul-2013 Alexey Samsonov <samsonov@google.com> [ASan] Properly disable strict init-order checking when pthread_create is called

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185342 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
it_tests/TestCases/Helpers/init-order-pthread-create-extra.cc
it_tests/TestCases/init-order-pthread-create.cc
f21e025112d5f82b2b475eb1d8e690824883fc97 01-Jul-2013 Alexander Potapenko <glider@google.com> [ASan] Cache atos processes to make Darwin symbolication faster.

Patch by Jesse Ruderman<jruderman@gmail.com>



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185325 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
997aede5a27c48d0b1a086212b24cb6101fb8351 01-Jul-2013 Alexey Samsonov <samsonov@google.com> [ASan] Add sanity test for asan_symbolize.py script

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185318 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/SharedLibs/shared-lib-test-so.cc
it_tests/TestCases/asan-symbolize-sanity-test.cc
it_tests/lit.cfg
ed936c1d3a8db321b45d2e249159ec48c6450043 01-Jul-2013 Alexey Samsonov <samsonov@google.com> [ASan] Remove leading underscores from function names in output tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185315 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/zero-base-shadow32.cc
it_tests/TestCases/Linux/zero-base-shadow64.cc
it_tests/TestCases/global-overflow.cc
it_tests/TestCases/heap-overflow.cc
it_tests/TestCases/ioctl.cc
it_tests/TestCases/large_func_test.cc
it_tests/TestCases/null_deref.cc
it_tests/TestCases/shared-lib-test.cc
it_tests/TestCases/stack-overflow.cc
it_tests/TestCases/strncpy-overflow.cc
it_tests/TestCases/use-after-free-right.cc
it_tests/TestCases/use-after-free.cc
it_tests/TestCases/use-after-scope-inlined.cc
it_tests/TestCases/use-after-scope-temp.cc
it_tests/TestCases/use-after-scope.cc
it_tests/TestCases/wait.cc
c8c312adee610a1f9284f567a35562f6f8dc15e0 01-Jul-2013 Alexey Samsonov <samsonov@google.com> Hide mlock/munlock info message under verbosity flag.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185314 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
fe18723033b4e06adcd339f67e9a63054380a63f 30-Jun-2013 Alexey Samsonov <samsonov@google.com> Define the path to llvm-symbolizer tool in a common config to reduce copy-paste

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185286 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
ec2ee9b51256b37ce637eee766fd9a454c02da2b 28-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] Remove %symbolize from lit tests: we now use external symbolizer instead of python script

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185163 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/heavy_uar_test.cc
it_tests/TestCases/Linux/initialization-bug-any-order.cc
it_tests/TestCases/Linux/malloc-in-qsort.cc
it_tests/TestCases/Linux/malloc_delete_mismatch.cc
it_tests/TestCases/Linux/overflow-in-qsort.cc
it_tests/TestCases/Linux/ptrace.cc
it_tests/TestCases/Linux/syscalls.cc
it_tests/TestCases/Linux/time_null_regtest.cc
it_tests/TestCases/Linux/zero-base-shadow32.cc
it_tests/TestCases/Linux/zero-base-shadow64.cc
it_tests/TestCases/deep_stack_uaf.cc
it_tests/TestCases/deep_tail_call.cc
it_tests/TestCases/deep_thread_stack.cc
it_tests/TestCases/double-free.cc
it_tests/TestCases/global-demangle.cc
it_tests/TestCases/global-overflow.cc
it_tests/TestCases/heap-overflow.cc
it_tests/TestCases/initialization-bug.cc
it_tests/TestCases/invalid-free.cc
it_tests/TestCases/ioctl.cc
it_tests/TestCases/large_func_test.cc
it_tests/TestCases/memcmp_strict_test.cc
it_tests/TestCases/memcmp_test.cc
it_tests/TestCases/null_deref.cc
it_tests/TestCases/partial_right.cc
it_tests/TestCases/readv.cc
it_tests/TestCases/sanity_check_pure_c.c
it_tests/TestCases/shared-lib-test.cc
it_tests/TestCases/stack-frame-demangle.cc
it_tests/TestCases/stack-oob-frames.cc
it_tests/TestCases/stack-overflow.cc
it_tests/TestCases/stack-use-after-return.cc
it_tests/TestCases/strdup_oob_test.cc
it_tests/TestCases/strncpy-overflow.cc
it_tests/TestCases/time_interceptor.cc
it_tests/TestCases/unaligned_loads_and_stores.cc
it_tests/TestCases/use-after-free-right.cc
it_tests/TestCases/use-after-free.cc
it_tests/TestCases/use-after-poison.cc
it_tests/TestCases/use-after-scope-dtor-order.cc
it_tests/TestCases/use-after-scope-inlined.cc
it_tests/TestCases/use-after-scope-temp.cc
it_tests/TestCases/use-after-scope.cc
it_tests/TestCases/wait.cc
it_tests/lit.cfg
2a9609814d6f187d5a949787e5a638911978283d 28-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] Migrate lit tests to external symbolizer from asan_symbolize.py script

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185148 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
341b9e63f63a8eacf1b699d4c79edee55241ebe6 28-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Intercept ptrace.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185142 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
it_tests/TestCases/Linux/ptrace.cc
6b233edfdb741fa75faec815ff3940724e8126a5 28-Jun-2013 Alexander Potapenko <glider@google.com> [ASan][OSX] Make sure the zones created by malloc_create_zone() are write-protected.
Add a test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185140 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
it_tests/TestCases/Darwin/malloc_zone-protected.cc
66ad412170787fb0d9f4832708a22d47d74633c5 28-Jun-2013 Alexander Potapenko <glider@google.com> [ASan][OSX] Fix the incorrect malloc_create_zone() implementation that led to out-of-bounds mprotect()s
(https://code.google.com/p/address-sanitizer/issues/detail?id=203)
Add a test.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185138 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
it_tests/TestCases/Darwin/malloc_set_zone_name-mprotect.cc
7a0bba457ee05ced3adf37a0c0790d0ed23a5446 26-Jun-2013 Kostya Serebryany <kcc@google.com> [asan] initialize fake_stack lazily and increase its maximal size. This makes -fsanitize=address,use-after-return more robust: all SPEC tests pass now. In the default mode thread stacks become a bit smaller.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184934 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_report.cc
san_thread.cc
san_thread.h
b6246066a271e3b01732d1b4381ef745152747d2 25-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Move log_path to common flag and use it in MSan.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184836 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
b916e6a9b3efa4907b70a2dcd418c76b044171e7 24-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Intercept readv, preadv, writev, pwritev.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184717 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/readv.cc
ac78d0087281e9b40bb043f827fbde8c05c6505a 24-Jun-2013 Sergey Matveev <earthdok@google.com> Revert to C-style callbacks for iteration over allocator chunks.

Also clean up LSan code, fix some comments and replace void* with uptr
to bring down the number of reinterpret_casts.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184700 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
c3b30b378741f3ec0f4d615ef172b68e1cf97e39 22-Jun-2013 Alexey Samsonov <samsonov@google.com> Add cmake rules for building LSan common on Mac OS

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184639 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
it_tests/TestCases/Linux/lsan_annotations.cc
it_tests/TestCases/lsan_annotations.cc
21e024eb4f1aa3c42bb9dbd1d93a4299807f9555 21-Jun-2013 Sergey Matveev <earthdok@google.com> [lsan] Try REALLY hard to fix Win build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184557 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
200afbd8ba4904241c1ebcef4fa79d739ca01f73 21-Jun-2013 Sergey Matveev <earthdok@google.com> [asan] Move lsan_disabled out of thread context.

Fix for the case where disabler is used in pthread key destructor.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184553 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_thread.cc
san_thread.h
d530d892b4958a9ae54e57472d5d0a0bae1f6ad8 21-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] reimplement strdup() interceptor to get nicer stack traces for memory chunks allocated there

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184546 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
it_tests/TestCases/strdup_oob_test.cc
18a918929b0690043964f97936e69c0eae10edd8 21-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] make test for LSan annotations Linux-only for now

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184541 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Linux/lsan_annotations.cc
it_tests/TestCases/lsan_annotations.cc
5326ee1a227cf3ee764ecb3d0b7220d45581036c 21-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] Check that ASan user may include and use LSan headers

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184540 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/lsan_annotations.cc
9b618a7ec2ec78e602d8897008c6f02cba673794 20-Jun-2013 Sergey Matveev <earthdok@google.com> [asan] Define LSan annotations as no-ops if leak detection is not supported.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184422 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
a292152eb471edc44021b94e974059a71e8bed13 20-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] Clear allocation magic value before recycling the chunk. This led to spurious crashes in LSan when it walked through reused chunks. Don't know how to create not-brittle test case for this.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184404 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
3f9f877480e751a9dd7f5df871121f52f1379a33 19-Jun-2013 Alexander Potapenko <glider@google.com> [ASan] Delete excessive 'extern "C"' around mlock* interceptors.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184294 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
2557a1b4517971c9cf1aff62425fc48561db9949 18-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Symbolic ioctl names.

Replace hardcoded ioctl request ids with symbolic names.
Disable certain ioctls on platforms where such names are not found in the
system headers.
Fix a bug in ioctl_lookup.
Reenable ioctl test on Mac.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184183 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/ioctl.cc
441a21644ad802b278c45b4e87153113639b2fcc 14-Jun-2013 Alexey Samsonov <samsonov@google.com> Properly install LSan interface header, rely on sanitizer header presence in lit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183977 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/interface_test.cc
it_tests/TestCases/unaligned_loads_and_stores.cc
a64d4359902f1f64992aedfe10d8882ae7c66f40 14-Jun-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Rename InternalVector to InternalMmapVector

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183972 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
485f73812dec2204e9f1b184bf01420859ca7f31 13-Jun-2013 Stephen Hines <srhines@google.com> Update compiler-rt for merge to r183849.

Android.mk updates:
Remove sanitizer_symbolizer.cc
Add sanitizer_common_libcdep.cc
Add sanitizer_linux_libcdep.cc
Add sanitizer_posix_libcdep.cc
Add sanitizer_symbolizer_libcdep.cc
Add sanitizer_symbolizer_linux_libcdep.cc
Add sanitizer_symbolizer_posix_libcdep.cc

Change-Id: Ibc62c8980d8cb5973dc312dfd8ecb1de0bfda03d
ndroid.mk
f9262aeba07a0bf4d0b3fc00aa579e3054594632 13-Jun-2013 Richard Trieu <rtrieu@google.com> Fix broken header guard.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183873 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.h
bb097bcb93a67ebbb7a89ac83f0a16c47c013a7f 12-Jun-2013 Stephen Hines <srhines@google.com> Merge commit 'b3b46dad13a2111a51fb1a67f36c8b633410e9b7' into merge_20130612

Conflicts:
lib/sanitizer_common/sanitizer_symbolizer_linux.cc

Change-Id: Ie0a701ed3d360d846b491116ff2e33e33968f291
b3b46dad13a2111a51fb1a67f36c8b633410e9b7 11-Jun-2013 Sergey Matveev <earthdok@google.com> [lsan] Harmonized some naming inconsistencies.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183748 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
d64bcf43935c9ceeb7376ca4185662811ae907ea 11-Jun-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] support running external llvm-symbolizer on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183730 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
dc8015f9efa3fa230f7276dd6bfb95501009d038 10-Jun-2013 Alexander Potapenko <glider@google.com> [ASan] Fix unset-insert-libraries-on-exec.cc on 32-bit Darwin.
The test used to execute a 64-bit /bin/bash binary and preload a 32-bit dynamic library into it.
Now the arch-specific version of echo-env is executed instead.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183662 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
it_tests/TestCases/Helpers/echo-env.cc
fdde5a97a71b142297d7b2270c2a7f564a37dbae 10-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] mark ioctl test as xfailing on darwin. remove redundant semicolons

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183655 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
it_tests/TestCases/ioctl.cc
72efa9440c362244e3e1fa64c16d630884d36c11 10-Jun-2013 Kostya Serebryany <kcc@google.com> [asan] fix Android build (mark asan_malloc_usable_size as an interface function)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183651 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
5d43b5a695ca6b6dc4eff05e723a7f39643f3266 10-Jun-2013 Kostya Serebryany <kcc@google.com> [asan] fix the bug with memalign and malloc_usable_size (http://code.google.com/p/address-sanitizer/issues/detail?id=193); also fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183647 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_noinst_test.cc
c65fe5e5bcffeb424deb6a2e18cb674beead23e1 10-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] don't use -m{32,64} flag in test case, as it can be run in both 32- and 64-bit modes

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183638 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/ioctl.cc
ea1b27f1dad287b33784b7e8c032182b5b0ddd18 07-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix test case to use absolute paths

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183527 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
fd55281122b4dedceb4e5a2fedc3946bfba9032b 07-Jun-2013 Alexander Potapenko <glider@google.com> [ASan] An early return from InitializeAsanInterceptors() on Mac has been considered unobvious.
Remove it and replace ASAN_INTERCEPT_FUNC with a no-op if SANITIZER_MAC==1.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183524 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
745dd0d296e7bef712df4b5c7f86c72534953738 07-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] ioctl interceptor.

ASan: disabled by default
MSan: enabled by default
TSan: disabled


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183517 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/TestCases/ioctl.cc
b957d9f20c934ac1af70353db6bc994490d7ea0e 07-Jun-2013 Alexey Samsonov <samsonov@google.com> Drop support for 32-bit PowerPC in sanitizer tools.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183499 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6efa4d6cf9bb214a5e8ddbb224a69b38c4ae6de6 07-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] create separate configs for running ASan lit tests in both 32- and 64-bit mode. Clean up RUN-lines in tests.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183498 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/32bitConfig/lit.site.cfg.in
it_tests/64bitConfig/lit.site.cfg.in
it_tests/CMakeLists.txt
it_tests/TestCases/Darwin/interface_symbols_darwin.c
it_tests/TestCases/Darwin/reexec-insert-libraries-env.cc
it_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
it_tests/TestCases/Linux/asan_prelink_test.cc
it_tests/TestCases/Linux/clone_test.cc
it_tests/TestCases/Linux/glob.cc
it_tests/TestCases/Linux/heavy_uar_test.cc
it_tests/TestCases/Linux/initialization-bug-any-order.cc
it_tests/TestCases/Linux/interception_failure_test.cc
it_tests/TestCases/Linux/interception_malloc_test.cc
it_tests/TestCases/Linux/interception_test.cc
it_tests/TestCases/Linux/interface_symbols_linux.c
it_tests/TestCases/Linux/malloc-in-qsort.cc
it_tests/TestCases/Linux/overflow-in-qsort.cc
it_tests/TestCases/Linux/swapcontext_test.cc
it_tests/TestCases/Linux/syscalls.cc
it_tests/TestCases/Linux/time_null_regtest.cc
it_tests/TestCases/Linux/unpoison_tls.cc
it_tests/TestCases/Linux/zero-base-shadow.cc
it_tests/TestCases/Linux/zero-base-shadow32.cc
it_tests/TestCases/Linux/zero-base-shadow64.cc
it_tests/TestCases/allow_user_segv.cc
it_tests/TestCases/blacklist.cc
it_tests/TestCases/deep_stack_uaf.cc
it_tests/TestCases/deep_tail_call.cc
it_tests/TestCases/deep_thread_stack.cc
it_tests/TestCases/dlclose-test.cc
it_tests/TestCases/double-free.cc
it_tests/TestCases/force_inline_opt0.cc
it_tests/TestCases/global-demangle.cc
it_tests/TestCases/global-overflow.cc
it_tests/TestCases/heap-overflow.cc
it_tests/TestCases/huge_negative_hea_oob.cc
it_tests/TestCases/init-order-atexit.cc
it_tests/TestCases/init-order-dlopen.cc
it_tests/TestCases/initialization-blacklist.cc
it_tests/TestCases/initialization-bug.cc
it_tests/TestCases/initialization-constexpr.cc
it_tests/TestCases/initialization-nobug.cc
it_tests/TestCases/interface_test.cc
it_tests/TestCases/invalid-free.cc
it_tests/TestCases/large_func_test.cc
it_tests/TestCases/malloc_fill.cc
it_tests/TestCases/memcmp_strict_test.cc
it_tests/TestCases/memcmp_test.cc
it_tests/TestCases/null_deref.cc
it_tests/TestCases/partial_right.cc
it_tests/TestCases/sanity_check_pure_c.c
it_tests/TestCases/shared-lib-test.cc
it_tests/TestCases/sleep_before_dying.c
it_tests/TestCases/stack-frame-demangle.cc
it_tests/TestCases/stack-oob-frames.cc
it_tests/TestCases/stack-overflow.cc
it_tests/TestCases/stack-use-after-return.cc
it_tests/TestCases/strip_path_prefix.c
it_tests/TestCases/strncpy-overflow.cc
it_tests/TestCases/time_interceptor.cc
it_tests/TestCases/use-after-free-right.cc
it_tests/TestCases/use-after-free.cc
it_tests/TestCases/use-after-poison.cc
it_tests/TestCases/use-after-scope-dtor-order.cc
it_tests/TestCases/use-after-scope-inlined.cc
it_tests/TestCases/use-after-scope-nobug.cc
it_tests/TestCases/use-after-scope-temp.cc
it_tests/TestCases/use-after-scope.cc
it_tests/TestCases/wait.cc
it_tests/lit.cfg
it_tests/lit.site.cfg.in
46ed75f54f1c3b7863ae74aec8c2c015d572f027 06-Jun-2013 Sergey Matveev <earthdok@google.com> [lsan] Put SANITIZER_INTERFACE_ATTRIBUTE on LSan interface functions.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183429 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
cd571e07fd1179383188c70338fa0dc1c452cb19 06-Jun-2013 Sergey Matveev <earthdok@google.com> [lsan] Implement __lsan_ignore_object().

Leak annotation similar to HeapChecker's IgnoreObject().

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183412 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
722f2e6a6125a0d5c9d453278b0f292e3410124d 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] make pthread_getschedparam test more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183411 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
06f069aa9b3dc692457366a6882e7b5d5da84ec3 06-Jun-2013 Alexey Samsonov <samsonov@google.com> Simplify lit configs for asan/lsan/msan unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183410 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Unit/lit.cfg
it_tests/Unit/lit.site.cfg.in
d668cd2ff37af5db33d21de9e809018ae74a99b7 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] create common autogenerated config for running compiler-rt unit tests, and use it in ASan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183401 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Unit/lit.cfg
it_tests/Unit/lit.site.cfg.in
dd6605eb299705e09160de7e1f9f505c40e5d1b2 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] lit tests: create common autogenerated config for running compiler-rt lit tests, and use it in ASan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183400 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
it_tests/lit.site.cfg.in
64e2282e9c984c598c93a8bd01983f842e247ce3 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] move all lit_tests under TestCases

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183395 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Darwin/interface_symbols_darwin.c
it_tests/Darwin/lit.local.cfg
it_tests/Darwin/reexec-insert-libraries-env.cc
it_tests/Darwin/unset-insert-libraries-on-exec.cc
it_tests/Helpers/blacklist-extra.cc
it_tests/Helpers/init-order-atexit-extra.cc
it_tests/Helpers/initialization-blacklist-extra.cc
it_tests/Helpers/initialization-blacklist-extra2.cc
it_tests/Helpers/initialization-blacklist.txt
it_tests/Helpers/initialization-bug-extra.cc
it_tests/Helpers/initialization-bug-extra2.cc
it_tests/Helpers/initialization-constexpr-extra.cc
it_tests/Helpers/initialization-nobug-extra.cc
it_tests/Helpers/lit.local.cfg
it_tests/Linux/asan_prelink_test.cc
it_tests/Linux/clone_test.cc
it_tests/Linux/glob.cc
it_tests/Linux/glob_test_root/aa
it_tests/Linux/glob_test_root/ab
it_tests/Linux/glob_test_root/ba
it_tests/Linux/heavy_uar_test.cc
it_tests/Linux/initialization-bug-any-order.cc
it_tests/Linux/interception_failure_test.cc
it_tests/Linux/interception_malloc_test.cc
it_tests/Linux/interception_test.cc
it_tests/Linux/interface_symbols_linux.c
it_tests/Linux/lit.local.cfg
it_tests/Linux/malloc-in-qsort.cc
it_tests/Linux/malloc_delete_mismatch.cc
it_tests/Linux/overflow-in-qsort.cc
it_tests/Linux/preinit_test.cc
it_tests/Linux/rlimit_mmap_test.cc
it_tests/Linux/swapcontext_test.cc
it_tests/Linux/syscalls.cc
it_tests/Linux/time_null_regtest.cc
it_tests/Linux/unpoison_tls.cc
it_tests/Linux/zero-base-shadow.cc
it_tests/SharedLibs/darwin-dummy-shared-lib-so.cc
it_tests/SharedLibs/dlclose-test-so.cc
it_tests/SharedLibs/init-order-dlopen-so.cc
it_tests/SharedLibs/lit.local.cfg
it_tests/SharedLibs/shared-lib-test-so.cc
it_tests/TestCases/Darwin/interface_symbols_darwin.c
it_tests/TestCases/Darwin/lit.local.cfg
it_tests/TestCases/Darwin/reexec-insert-libraries-env.cc
it_tests/TestCases/Darwin/unset-insert-libraries-on-exec.cc
it_tests/TestCases/Helpers/blacklist-extra.cc
it_tests/TestCases/Helpers/init-order-atexit-extra.cc
it_tests/TestCases/Helpers/initialization-blacklist-extra.cc
it_tests/TestCases/Helpers/initialization-blacklist-extra2.cc
it_tests/TestCases/Helpers/initialization-blacklist.txt
it_tests/TestCases/Helpers/initialization-bug-extra.cc
it_tests/TestCases/Helpers/initialization-bug-extra2.cc
it_tests/TestCases/Helpers/initialization-constexpr-extra.cc
it_tests/TestCases/Helpers/initialization-nobug-extra.cc
it_tests/TestCases/Helpers/lit.local.cfg
it_tests/TestCases/Linux/asan_prelink_test.cc
it_tests/TestCases/Linux/clone_test.cc
it_tests/TestCases/Linux/glob.cc
it_tests/TestCases/Linux/glob_test_root/aa
it_tests/TestCases/Linux/glob_test_root/ab
it_tests/TestCases/Linux/glob_test_root/ba
it_tests/TestCases/Linux/heavy_uar_test.cc
it_tests/TestCases/Linux/initialization-bug-any-order.cc
it_tests/TestCases/Linux/interception_failure_test.cc
it_tests/TestCases/Linux/interception_malloc_test.cc
it_tests/TestCases/Linux/interception_test.cc
it_tests/TestCases/Linux/interface_symbols_linux.c
it_tests/TestCases/Linux/lit.local.cfg
it_tests/TestCases/Linux/malloc-in-qsort.cc
it_tests/TestCases/Linux/malloc_delete_mismatch.cc
it_tests/TestCases/Linux/overflow-in-qsort.cc
it_tests/TestCases/Linux/preinit_test.cc
it_tests/TestCases/Linux/rlimit_mmap_test.cc
it_tests/TestCases/Linux/swapcontext_test.cc
it_tests/TestCases/Linux/syscalls.cc
it_tests/TestCases/Linux/time_null_regtest.cc
it_tests/TestCases/Linux/unpoison_tls.cc
it_tests/TestCases/Linux/zero-base-shadow.cc
it_tests/TestCases/SharedLibs/darwin-dummy-shared-lib-so.cc
it_tests/TestCases/SharedLibs/dlclose-test-so.cc
it_tests/TestCases/SharedLibs/init-order-dlopen-so.cc
it_tests/TestCases/SharedLibs/lit.local.cfg
it_tests/TestCases/SharedLibs/shared-lib-test-so.cc
it_tests/TestCases/allow_user_segv.cc
it_tests/TestCases/blacklist.cc
it_tests/TestCases/deep_stack_uaf.cc
it_tests/TestCases/deep_tail_call.cc
it_tests/TestCases/deep_thread_stack.cc
it_tests/TestCases/default_blacklist.cc
it_tests/TestCases/default_options.cc
it_tests/TestCases/dlclose-test.cc
it_tests/TestCases/double-free.cc
it_tests/TestCases/force_inline_opt0.cc
it_tests/TestCases/free_hook_realloc.cc
it_tests/TestCases/global-demangle.cc
it_tests/TestCases/global-overflow.cc
it_tests/TestCases/heap-overflow.cc
it_tests/TestCases/huge_negative_hea_oob.cc
it_tests/TestCases/init-order-atexit.cc
it_tests/TestCases/init-order-dlopen.cc
it_tests/TestCases/initialization-blacklist.cc
it_tests/TestCases/initialization-bug.cc
it_tests/TestCases/initialization-constexpr.cc
it_tests/TestCases/initialization-nobug.cc
it_tests/TestCases/interface_test.cc
it_tests/TestCases/invalid-free.cc
it_tests/TestCases/large_func_test.cc
it_tests/TestCases/log-path_test.cc
it_tests/TestCases/log_path_fork_test.cc.disabled
it_tests/TestCases/malloc_fill.cc
it_tests/TestCases/malloc_hook.cc
it_tests/TestCases/memcmp_strict_test.cc
it_tests/TestCases/memcmp_test.cc
it_tests/TestCases/null_deref.cc
it_tests/TestCases/on_error_callback.cc
it_tests/TestCases/partial_right.cc
it_tests/TestCases/sanity_check_pure_c.c
it_tests/TestCases/shared-lib-test.cc
it_tests/TestCases/sleep_before_dying.c
it_tests/TestCases/stack-frame-demangle.cc
it_tests/TestCases/stack-oob-frames.cc
it_tests/TestCases/stack-overflow.cc
it_tests/TestCases/stack-use-after-return.cc
it_tests/TestCases/strip_path_prefix.c
it_tests/TestCases/strncpy-overflow.cc
it_tests/TestCases/symbolize_callback.cc
it_tests/TestCases/throw_call_test.cc
it_tests/TestCases/throw_invoke_test.cc
it_tests/TestCases/time_interceptor.cc
it_tests/TestCases/unaligned_loads_and_stores.cc
it_tests/TestCases/use-after-free-right.cc
it_tests/TestCases/use-after-free.cc
it_tests/TestCases/use-after-poison.cc
it_tests/TestCases/use-after-scope-dtor-order.cc
it_tests/TestCases/use-after-scope-inlined.cc
it_tests/TestCases/use-after-scope-nobug.cc
it_tests/TestCases/use-after-scope-temp.cc
it_tests/TestCases/use-after-scope.cc
it_tests/TestCases/wait.cc
it_tests/allow_user_segv.cc
it_tests/blacklist.cc
it_tests/deep_stack_uaf.cc
it_tests/deep_tail_call.cc
it_tests/deep_thread_stack.cc
it_tests/default_blacklist.cc
it_tests/default_options.cc
it_tests/dlclose-test.cc
it_tests/double-free.cc
it_tests/force_inline_opt0.cc
it_tests/free_hook_realloc.cc
it_tests/global-demangle.cc
it_tests/global-overflow.cc
it_tests/heap-overflow.cc
it_tests/huge_negative_hea_oob.cc
it_tests/init-order-atexit.cc
it_tests/init-order-dlopen.cc
it_tests/initialization-blacklist.cc
it_tests/initialization-bug.cc
it_tests/initialization-constexpr.cc
it_tests/initialization-nobug.cc
it_tests/interface_test.cc
it_tests/invalid-free.cc
it_tests/large_func_test.cc
it_tests/lit.cfg
it_tests/lit.site.cfg.in
it_tests/log-path_test.cc
it_tests/log_path_fork_test.cc.disabled
it_tests/malloc_fill.cc
it_tests/malloc_hook.cc
it_tests/memcmp_strict_test.cc
it_tests/memcmp_test.cc
it_tests/null_deref.cc
it_tests/on_error_callback.cc
it_tests/partial_right.cc
it_tests/sanity_check_pure_c.c
it_tests/shared-lib-test.cc
it_tests/sleep_before_dying.c
it_tests/stack-frame-demangle.cc
it_tests/stack-oob-frames.cc
it_tests/stack-overflow.cc
it_tests/stack-use-after-return.cc
it_tests/strip_path_prefix.c
it_tests/strncpy-overflow.cc
it_tests/symbolize_callback.cc
it_tests/throw_call_test.cc
it_tests/throw_invoke_test.cc
it_tests/time_interceptor.cc
it_tests/unaligned_loads_and_stores.cc
it_tests/use-after-free-right.cc
it_tests/use-after-free.cc
it_tests/use-after-poison.cc
it_tests/use-after-scope-dtor-order.cc
it_tests/use-after-scope-inlined.cc
it_tests/use-after-scope-nobug.cc
it_tests/use-after-scope-temp.cc
it_tests/use-after-scope.cc
it_tests/wait.cc
092adea3fb988896bfdbf02db99b7e23b8243efd 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] Add a few tests for use-after-scope mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183391 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/use-after-scope-dtor-order.cc
it_tests/use-after-scope-nobug.cc
it_tests/use-after-scope-temp.cc
it_tests/use-after-scope.cc
049c91975f7515206d6cd7d104af51a542bb72e7 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] One more fix for realloc: check that reallocated chunk is valid before calling memcpy

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183390 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
fa50ea7718f094f3737dad23e7bc6b6c086e362b 06-Jun-2013 Alexey Samsonov <samsonov@google.com> [ASan] make free_hook_realloc test more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183387 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/free_hook_realloc.cc
2e9ffcbc2184f308881fc04ce0799c557b7e5b0f 04-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Fix __sanitizer_unaligned_* to work with unaligned data types.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183224 91177308-0d34-0410-b5e6-96231b3b80d8
san_poisoning.cc
87bd39a72b65f1ef5c5a33fc8ba3aebae998903e 04-Jun-2013 Alexey Samsonov <samsonov@google.com> Call __asan_free_hook() before marking the chunk quarantinned

Summary:
With this change, the user may safely call __asan_get_ownership()
from malloc/free hooks and assume it would return "true". If there is a
realloc/free race, free hook might be called twice, but I think it's acceptable,
as it's a data race and would later be reported anyway.

This change also fixes a bug when failing realloc incorrectly marked the
original memory as "quarantinned".

Reviewers: timurrrr, kcc, samsonov

Reviewed By: samsonov

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D913

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183220 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
it_tests/free_hook_realloc.cc
it_tests/malloc_hook.cc
ests/asan_test.cc
b42085e0e9e0f48d4ff776b3acae6c4ef1fab8bb 04-Jun-2013 Sergey Matveev <earthdok@google.com> [asan] Fix invalid thread registry access when checking if LSan is disabled.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183218 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
7c9ffde46a475d6dd739e977b547c27ac5968976 04-Jun-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix ALIGNED misuse in asan_thread.cc (built on all platforms); also, add a comment to the ALIGNED macro describing the correct usage

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183214 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
40527a579131210fcfa2373620a0c2200800e7c4 03-Jun-2013 Kostya Serebryany <kcc@google.com> [asan] ASan Linux MIPS32 support (compiler-rt part), patch by Jyun-Yan Y

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183105 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mapping.h
san_thread.cc
5e719a705666988781b9735d62cafc808ade60e2 03-Jun-2013 Sergey Matveev <earthdok@google.com> [lsan] Add __lsan_disable() and __lsan_enable().

Objects allocated after a call to __lsan_disable() will be treated as
live memory. Also add a ScopedDisabler.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183099 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_thread.cc
san_thread.h
bb561cbcb86908e66958c0c20b0c8bc8e981bdf3 31-May-2013 Alexander Potapenko <glider@google.com> [ASan] Do not buffer stdin in asan_symbolize.py


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183006 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
ba2169a467abf86c15d4b19a5ed4d978c584a98e 31-May-2013 Sergey Matveev <earthdok@google.com> [lsan] Use the fast version of GetBlockBegin for leak checking in LSan and ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182994 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
f8c3f3db72780cd57ce7959e70167b7553e55fb8 30-May-2013 Kostya Serebryany <kcc@google.com> [sanitizer] introduce LargeMmapAllocator::GetBlockBeginFastSingleThreaded, required for LeakSanitizer to work faster. Also fix lint.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182917 91177308-0d34-0410-b5e6-96231b3b80d8
san_poisoning.h
41dcb1c8848c8677c06216c6fcaa9b001f736778 30-May-2013 Alexander Potapenko <glider@google.com> [ASan] Minor cleanup: remove a couple of unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182915 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
8d2438a7ebb01201c652f91d1e8043a1f3d03bff 29-May-2013 Timur Iskhodzhanov <timurrrr@google.com> Replaced 'bool .* = 0;' with '... = false;'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182868 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
69c1d48dfb6f4bfa088c5931768878b3a1d721b7 29-May-2013 Sergey Matveev <earthdok@google.com> [asan] Fix r182858.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182862 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/unpoison_tls.cc
2e8fae79eaf8adb7ed09f3a2ee923d9296974d2f 29-May-2013 Sergey Matveev <earthdok@google.com> [asan] Fix r182854: run the unpoison_tls test only on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182858 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/unpoison_tls.cc
it_tests/unpoison_tls.cc
5e97ba38b00eb843a55189bb913b445cbe620894 29-May-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix MSVC W3 compiler warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182857 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_fake_stack.h
san_interceptors.cc
san_poisoning.h
san_report.cc
12d01bac1c09a8412546e71485a3cba2d416c0fc 29-May-2013 Sergey Matveev <earthdok@google.com> [asan] Make ASan report the correct thread address ranges to LSan.

This CL enables thread support in LSan when used on top of ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182854 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
san_thread.cc
san_thread.h
it_tests/unpoison_tls.cc
9d1525ec52430d0b8ffd6d0893b7f5529105b321 29-May-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Share TSan accept & accept4 interceptors with other sanitizers.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182835 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ebe3a3608be122e799e264931f9cecf4cbc84edd 27-May-2013 Sergey Matveev <earthdok@google.com> [lsan] Begin converting LSan tests to output tests.

In this CL all old tests are removed and one LIT test is added.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182730 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
57434a3174cfd9c4c5f304ea412492e4935cc18d 27-May-2013 Alexey Samsonov <samsonov@google.com> Improve support for compiler-rt tests in CMake build.

Now compiler-rt tests run correctly if compiler-rt is checked out into
arbitrary directory (not necessarily projects/compiler-rt).
Patch by Greg Fitzgerald!


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182726 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Unit/lit.cfg
it_tests/Unit/lit.site.cfg.in
it_tests/lit.cfg
it_tests/lit.site.cfg.in
46efcb09dc16b91cb805abea52f3ff6081a63751 24-May-2013 Alexey Samsonov <samsonov@google.com> Disable init-order checking before destructors are run.

We don't want to report initialization-order bugs when a destructor of a global
variable accesses dynamically initialized global from another
(not necessarily initialized) module. We do this by intercepting __cxa_atexit and
registrering our own callback that unpoisons shadow for all dynamically initialized
global variables.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182637 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_intercepted_functions.h
san_interceptors.cc
san_internal.h
it_tests/Helpers/init-order-atexit-extra.cc
it_tests/init-order-atexit.cc
a7e8c97e8af9e375ea37cf03a3da0cd645d95d6a 23-May-2013 Alexander Potapenko <glider@google.com> [ASan] Rename __asan_preinit to __local_asan_preinit to avoid warnings from the linker which is trying to export all the __asan_* symbols


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182567 91177308-0d34-0410-b5e6-96231b3b80d8
san_preinit.cc
d570bb4c7d82767d26ada0f923f84b10d8ec0fc6 22-May-2013 Kostya Serebryany <kcc@google.com> [asan] fix the reported PCs for powerpc64

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182477 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
975a3294d9baf6bbbcfdb3c3a0e0a24714cde7cb 22-May-2013 Alexey Samsonov <samsonov@google.com> Revert r182465 and add lsan-common library to makefile-based build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182470 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator2.cc
san_rtl.cc
b5433dd977c6b528b7e0d83fa1fc45d6503a1226 22-May-2013 Alexey Samsonov <samsonov@google.com> [ASan] Temporary remove leak checking from ASan, while we don't have makefile-based build for LSan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182465 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator2.cc
san_rtl.cc
ac39dfb85e6b0007b313a794fed9f093878c05fd 22-May-2013 Kostya Serebryany <kcc@google.com> [asan] enhance stack-overflow.cc test: check that the location frame is properly symbolized

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182463 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/stack-overflow.cc
c26d450d5f459ffb91a4225b6367d57bf6c36b8d 22-May-2013 Kostya Serebryany <kcc@google.com> [asan] attempting to fix the debian bot (on ubuntu the test builds; on debian it complains that _SC_PAGESIZE is unknown)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182462 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/dlclose-test.cc
5cf3cedc0d469a266880d9bfb5eccfabf2033388 22-May-2013 Kostya Serebryany <kcc@google.com> [asan] fix dlclose-test to work with non-4K pages. Properly disable interface_symbols_linux on non-x86

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182461 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/interface_symbols_linux.c
it_tests/dlclose-test.cc
30e970f769ccf11e61e472c6f8b22f8e866c592f 22-May-2013 Kostya Serebryany <kcc@google.com> [asan] workaround for asan bug 189 (swapcontext followed by throw gets OOM kill). Also, disable swapcontext_test on non-x86. Fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182456 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/Linux/swapcontext_test.cc
ests/asan_test.cc
4cacb4f6fb6127099fa5a816b12b2565e5bed4fe 21-May-2013 Sergey Matveev <earthdok@google.com> [lsan] Invoke leak detection with atexit().

Keeps it consistent between ASan and LSan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182399 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
0bc81775b75f2c8c6c8c0e1af4008771d5b882ab 21-May-2013 Sergey Matveev <earthdok@google.com> [asan] Do not invoke LSan hooks unless CAN_SANITIZE_LEAKS.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182389 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
71f0411c8289b57bc1a2cb3ccc02ae7fae25fd33 21-May-2013 Sergey Matveev <earthdok@google.com> [asan] LSan hooks in asan_rtl.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182384 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
9bdf7802d403b53baee3433ddddc220f457e039c 21-May-2013 Sergey Matveev <earthdok@google.com> [lsan] Change CMakeLists to build the common LSan module for ASan.
Also, define CAN_SANITIZE_LEAKS.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182383 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
4d1b3830595e9c74b42a5a1e4a04b4e53f0d61bd 21-May-2013 Alexey Samsonov <samsonov@google.com> [MSan] Add empty default blacklist for MSan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182382 91177308-0d34-0410-b5e6-96231b3b80d8
san_blacklist.txt
c1caacee4245f4511b52a697b2ae300a1c53ddef 21-May-2013 Alexey Samsonov <samsonov@google.com> [ASan] create default (empty) ASan blacklist file in resource directory

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182380 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_blacklist.txt
it_tests/CMakeLists.txt
it_tests/default_blacklist.cc
79367ad4c69cf832395ff0d2df647634c553683d 21-May-2013 Sergey Matveev <earthdok@google.com> [asan] LSan hooks in asan_allocator2.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182379 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
f1ac1a44b4ed022f0a587a6bd711b1afbd3f8f62 21-May-2013 Sergey Matveev <earthdok@google.com> [asan] LSan hooks in asan_thread.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182378 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
37642cf7d1127684e79efe3154c57f30975f236b 21-May-2013 Alexey Samsonov <samsonov@google.com> [ASan] Mark init-order test as XFAIL on Darwin

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182365 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/initialization-bug.cc
a6e7d8d6369eb676d8c4ed4223e42743e367057f 21-May-2013 Alexey Samsonov <samsonov@google.com> [ASan] Don't run fast unwinder tests on 32-bit Linux as fast unwinder may be unexpectedly smart on some hosts

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182363 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/malloc-in-qsort.cc
it_tests/Linux/overflow-in-qsort.cc
098847d2a24ca010e543adb3e1140d56f30a6a90 21-May-2013 Alexey Samsonov <samsonov@google.com> [ASan] Mark some tests as working only on x86_64 and i386 arches

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182360 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/asan_prelink_test.cc
it_tests/Linux/interface_symbols_linux.c
it_tests/Linux/malloc-in-qsort.cc
it_tests/Linux/overflow-in-qsort.cc
it_tests/Linux/time_null_regtest.cc
it_tests/Linux/zero-base-shadow.cc
6b5346e5a7d9e9107842b6a7af79fe2667c40900 21-May-2013 Alexey Samsonov <samsonov@google.com> Add lit config feature <target>-supported-target to mark target-specific tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182355 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.site.cfg.in
56d3472104dd9fec6578e02f4895f3254e038e8e 21-May-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Intercept pthread_getschedparam.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182353 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
41d69f4fd5454d5bf2614cbb3e8ed77a935c880b 20-May-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix realloc'ing freed/invalid pointers

See https://code.google.com/p/address-sanitizer/issues/detail?id=187 for the details

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182255 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_test.cc
e7ca05603222f61bab630f619bf59c0c927ff7de 20-May-2013 Sergey Matveev <earthdok@google.com> [asan] Modify ASan metadata atomically.

We need this to avoid races when ASan and LSan are used together.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182252 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
7ce8de1854fbc164e08dd715217240b8f2f0b06c 20-May-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Remove an unused ChunkBase field

Also fix wrong alignment maths and an outdated comment

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182238 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
1b54cbfbd12d6302838a6d4d6c42d90bd9c6b9d5 20-May-2013 Kostya Serebryany <kcc@google.com> [sanitizer] factor out ByteMap from SizeClassAllocator32 so that it can be later replaced with a more memory-efficient implementation on 64-bit.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182234 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
fb98d3dc1e3a5eb9130fb7f16b8a50b616498139 18-May-2013 Timur Iskhodzhanov <timurrrr@google.com> Replace CHECK(a == b); with CHECK_EQ(a, b); throughout asan_allocator2.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182198 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
0b694fcab9b2f33bdd6691cbea4e80a5c27191b1 17-May-2013 Peter Collingbourne <peter@pcc.me.uk> [nolibc] Move all platforms to internal_getpid.

Before, we had an unused internal_getpid function for Linux, and a
platform-independent GetPid function. To make the naming conventions
consistent for syscall-like functions, the GetPid syscall wrapper
in sanitizer_posix.cc is moved to sanitizer_mac.cc, and GetPid is
renamed to internal_getpid, bringing the Linux variant into use.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182132 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
0c547de62dc0852a03fae2d868fa571e7f5512b3 17-May-2013 Peter Collingbourne <peter@pcc.me.uk> [nolibc] Begin moving sanitizer_common's libc-dependent code to a separate library

Introduce a new object library, RTSanitizerCommonLibc, which will contain
the subset of sanitizer_common with libc dependencies. RTSanitizerCommon
contains the remainder of sanitizer_common, and is intended to have no
libc dependencies. Begin moving code to RTSanitizerCommonLibc, starting
with sanitizer_common.cc, whose libc-dependent portion is moved to
sanitizer_common_libcdep.cc, the first member of the new library.

This split affects the CMake build only. The makefile build continues
to produce the full sanitizer_common library.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182118 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c754cd70347b33da0475b191a5d6bad9d5c4362c 17-May-2013 Alexander Potapenko <glider@google.com> [ASan] Make the regression test for time(NULL) Linux-specific, as it crashes on Darwin (and the problem used to occur on Linux).
Do not use zero-based shadow for the time() test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182107 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/time_null_regtest.cc
it_tests/time_interceptor.cc
972f301fdbd7a7e058766539d6f51b9be3fdf55f 17-May-2013 Alexander Potapenko <glider@google.com> [ASan] Fix allow_user_segv.cc on Darwin (32-bit build required a SIGBUS handler instead of the SIGSEGV one)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182080 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/allow_user_segv.cc
31750e3acce47343329e9b930d50a5f38d159edf 16-May-2013 Alexander Potapenko <glider@google.com> [ASan] Fix init-order-dlopen.cc to pass under Mac OS.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182010 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/init-order-dlopen.cc
5584c0465ebe273b28af7c9bd65476ddf3d3dee8 16-May-2013 Alexander Potapenko <glider@google.com> [ASan] Fix interface_symbols_darwin to pass a correct flag to nm.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182008 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Darwin/interface_symbols_darwin.c
b76ea0ce262a97e39fbf443b6aa8768c2c27e7b7 16-May-2013 Kostya Serebryany <kcc@google.com> [asan] symbolize when possible, even if ASAN_SYMBOLIZER_PATH is not provided. On Linux this will use dl_iterate_phdr instead of /proc/self/maps, even if the symbolizer is not installed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182005 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
9277b1ff831ad4e3979e7a6203e838d6d62266c6 16-May-2013 Kostya Serebryany <kcc@google.com> [asan] fix ShadowGapTest on PowerPC64

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181991 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
0bdc46c7ee03e8c4e4da7c5ac43edac237aa53e2 15-May-2013 Kostya Serebryany <kcc@google.com> [asan] disable BuiltinLongJmpTest on PowerPC

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181890 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
f931da85ce8668751628ded926ecad013c5d6f1a 15-May-2013 Kostya Serebryany <kcc@google.com> [asan] fix powerpc build and one test; fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181881 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_test.cc
84b35c4ddf4e9ad23b40bb4c4d9fbc4c0a3d53a2 14-May-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add sanitizer syscall hooks to the tool's export lists.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181790 91177308-0d34-0410-b5e6-96231b3b80d8
san.syms
33280bba681b7bb683be01749aaba70dc06ffb6c 08-May-2013 Sergey Matveev <earthdok@google.com> Quick fix for ASan test build on Android.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181429 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
736cf49a46b3cc5aa1856762f85e6f2799c24e5a 08-May-2013 Sergey Matveev <earthdok@google.com> [sanitizer] Move GetStackTrace from ASan to sanitizer_common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181424 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mac.cc
san_stack.h
san_win.cc
3a02de31fcd8f0071c5d1f2048c7cc1643c16327 04-May-2013 Stephen Hines <srhines@google.com> Update compiler-rt for merge to r180792.

Change-Id: I7e42def7ed94e1fd15a1de3ad6eb53ce3248b783
ndroid.mk
ed20ebe35c64b8c7043447f6a48b0e5adc89aded 06-May-2013 Sergey Matveev <earthdok@google.com> [asan] Common flags in ASan.

Some flags that are common to ASan/MSan/TSan/LSan have been moved to
sanitizer_common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181193 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_flags.h
san_report.cc
san_rtl.cc
san_stack.cc
san_stack.h
ca4417d35e8c1644f2f45d52e07dafdee75f1e55 03-May-2013 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/master' into merge-20130502
332bf3340435a85d39d6abefbf4d6a145e17da1c 25-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Add allow_user_segv_handler to let users override SEGV handler installed by ASan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180255 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_interceptors.cc
san_rtl.cc
it_tests/allow_user_segv.cc
bdd0966deb04068ea94cf416c7fb46516013bd26 23-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Disable strict-init-order checker once we have more than one thread, as this mode is thread-hostile

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180106 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
it_tests/init-order-dlopen.cc
51e9728c7202ae8111a308fcba74f5126075c42a 23-Apr-2013 Alexander Potapenko <glider@google.com> [ASan] Make wait.cc more Darwin-compatible: fix the header name and the CHECK patterns.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180097 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/wait.cc
8db82e151f4dc3de33530adce370a3d86be54cf9 23-Apr-2013 Alexander Potapenko <glider@google.com> [ASan] Disable AddressSanitizer.AllocDeallocMismatch on Darwin.
See https://code.google.com/p/address-sanitizer/issues/detail?id=131.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180093 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
64544c1093e2a911af0df20c60bd16ff90b4018c 19-Apr-2013 Alexey Samsonov <samsonov@google.com> Fixup for r179843: add missing header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179844 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/init-order-dlopen.cc
dfeef67b23ba92bbee598293164ee20078f633a1 19-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Make init-order checker allow access to already initialized globals.

This change adds ASan runtime option "strict-init-order" (off by default)
that makes init-order checker bark if global initializer accesses any global from different
translation unit (even if the latter is already initialized). strict init-order checking
doesn't play well with, e.g. LLVM registration machineries, and causes issue
https://code.google.com/p/address-sanitizer/issues/detail?id=178.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179843 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_globals.cc
san_rtl.cc
it_tests/Linux/initialization-bug-any-order.cc
it_tests/SharedLibs/init-order-dlopen-so.cc
it_tests/init-order-dlopen.cc
3f5528b4112a6e63d4535c1804bee4ba310879e7 16-Apr-2013 Sergey Matveev <earthdok@google.com> [asan] Fix spelling in asan_rtl.cc Test commit.

Reviewers: kcc, glider, samsonov

Reviewed By: glider

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D676

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179595 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
881b677c189e65872fd315a75a0e56f077339189 12-Apr-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Add syscall handlers to ASan and TSan runtimes.

ASan checks addressability of syscall arguments. TSan does nothing for now.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179380 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
it_tests/Linux/syscalls.cc
16cc10d9f4aeaec7e403102958dac475b08642ec 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] inline flags(), up to 1% perf gain on malloc-intensive code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179307 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
fecbf270853bda8aa6c14917fdfee840493a061b 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] make heavy_uar_test even heavier

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179306 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/heavy_uar_test.cc
2a529adba0707d9b5977d47e884aef6b0be8c94f 11-Apr-2013 Alexey Samsonov <samsonov@google.com> Explicitly list all sanitizer headers in CMake build rules. Make sure sanitizer lit_tests depend on fresh headers.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179293 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/CMakeLists.txt
71c9e9ebd85afdea5d0b56cdf9138fc5afc609cb 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] improve the UAR reporting (try harder to find the correct frame), try to make the test more stable

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179292 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
it_tests/Linux/heavy_uar_test.cc
37f9464fc0fa4df2acf04264c52ba542d0e3d3fb 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] make heavy_uar_test a bit more heavy and fix he fake stack to pass this test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179286 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.h
it_tests/Linux/heavy_uar_test.cc
61723f255b8e901e550a2e445fe500eeb283fe9b 11-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] test source-based init-order blacklisting added in r179280

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179281 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Helpers/initialization-blacklist-extra2.cc
it_tests/Helpers/initialization-blacklist.txt
it_tests/initialization-blacklist.cc
ce0f7d13a6d2f1c141bc247aa75770cb88b38cb6 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] fix use-after-return functionality (PR15672) and enable the corresponding test. We still don't guarantee anything with regard to use-after-return checking

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179278 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.h
it_tests/Linux/heavy_uar_test.cc
22c1c18585f04957cbb7b90573e7acf8ed1c1ca7 11-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Symbolize correct address when printint error summary

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179274 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
244384d1a8a518c0b1ceaa5809333a91db1104b6 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] move fake stack into a separate .h file; actually disable a failing test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179273 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_fake_stack.h
san_thread.h
it_tests/Linux/heavy_uar_test.cc
2c02f6327f51243fc0ba17992cecb2857fa8bdf8 11-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] add heavy_uar_test (disabled); fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179271 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/heavy_uar_test.cc
it_tests/time_interceptor.cc
15832c2afc4f04fa558160441d1b01fb3f0ec08b 10-Apr-2013 Alexander Potapenko <glider@google.com> [ASan] Do not check the shadow of NULL argument in the time() interceptor.
Add a test for time().


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179177 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/time_interceptor.cc
dc0d17952a060731e47d056f8487d0744037f52e 10-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] implement callbacks for unaligned loads/stores

Reviewers: samsonov

Reviewed By: samsonov

CC: samsonov, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D652

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179175 91177308-0d34-0410-b5e6-96231b3b80d8
san_poisoning.cc
it_tests/unaligned_loads_and_stores.cc
f3f2f5ced1fa60dcec46f423297d5e651db8437f 10-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix a typo in legend in error report

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179161 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
897a4ae31f5c55255c78854b69b4cd4a4e3c7c39 09-Apr-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Interceptors for wait*.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179096 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
it_tests/wait.cc
a1c2a5547d815a4ce116f04ebd3cef1716ab791c 09-Apr-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [msan] Intercept glob() with tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179091 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/glob.cc
it_tests/Linux/glob_test_root/aa
it_tests/Linux/glob_test_root/ab
it_tests/Linux/glob_test_root/ba
8a6cac57625f46e9e9a8977a518e8b92499d612f 09-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] relax Linux/zero-base-shadow.cc to make it pass on newer Ubuntu; fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179088 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/zero-base-shadow.cc
5ef2920d1f2e273f06e7dc512cbae5a9043ce21a 05-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] make huge_negative_hea_oob more meaningful

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178876 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/huge_negative_hea_oob.cc
d26a01e14a38a37c742fbd676efc99a6b7eea1e6 05-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] add a test for huge left oob

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178874 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/huge_negative_hea_oob.cc
a27bdf70ca24202dce21cf7c1a387aeaa400d889 05-Apr-2013 Kostya Serebryany <kcc@google.com> [sanitizer] found a bug by code inspection: CHECK(a=b) instead of CHECK(a==b). Was puzzled why lint did not catch it. Turns out this check was disabled for asan source. fix all cases and enable the check

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178872 91177308-0d34-0410-b5e6-96231b3b80d8
san_fake_stack.cc
san_interceptors.cc
san_mac.cc
san_poisoning.cc
san_posix.cc
san_report.cc
san_rtl.cc
san_stats.cc
san_thread.cc
ce184c8657d7ef3f165fd7561b8f6c06c4ecbe4d 05-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] init-order checker tests: move constexpr test that requires -std=c++11 to a separate test case. Check that structs with no ctor but non-trivial dtor are ignored.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178857 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Helpers/initialization-constexpr-extra.cc
it_tests/Helpers/initialization-nobug-extra.cc
it_tests/initialization-constexpr.cc
it_tests/initialization-nobug.cc
7ed46ff7af911da0dd2067734d1408c6986c6657 05-Apr-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use a common mutex to prevent mixing reports from different sanitizers. This fixes PR15516

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178853 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
b1971ca4a3057916ca90a733c672a08127d5fe67 04-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] nuke the old unused allocator code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178758 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator.cc
san_allocator.h
san_allocator2.cc
san_flags.h
san_rtl.cc
ests/asan_noinst_test.cc
ests/asan_oob_test.cc
2a3619ecbb56e828090b4c40ece28550f68c94de 04-Apr-2013 Kostya Serebryany <kcc@google.com> [asan] fill first 4K of malloc-ed memory with garbage, implement flags max_malloc_fill_size and malloc_fill_byte

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178757 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_flags.h
san_rtl.cc
it_tests/malloc_fill.cc
it_tests/use-after-poison.cc
649a270f5341efe9c57f473dbb78706b0b2ed523 03-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Kill the remainders of platform defines in favor of SANITIZER_ defines

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178629 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_internal.h
san_linux.cc
san_mac.cc
san_malloc_linux.cc
san_malloc_mac.cc
san_new_delete.cc
san_posix.cc
939316c822cc46e62684464eecd5cb2cefcf41c5 01-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] More careful reports for globals that are ASCII strings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178458 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
it_tests/global-demangle.cc
b157c67e17c3fc8805c8b7cb590668885680608f 28-Mar-2013 Timur Iskhodzhanov <timurrrr@google.com> Remove all 'static' before ALWAYS_INLINE

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178290 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
abfdbdf5bc7e9d202652fe061acd20c14a4d22f4 28-Mar-2013 Timur Iskhodzhanov <timurrrr@google.com> Make all the ALWAYS_INLINE users Windows-friendly; also, avoid ALWAYS_INLINE INLINE combinations

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178266 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_poisoning.h
7e8434940a1fe7dce531d4c458ccd714da48f609 28-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Speed-up initialization-order checking: create and use fast versions of PoisonShadow functions, store copies of __asan_global descriptors in a vector instead of list of pointers. This gives 3x speedup on both benchmarks and real binaries with lots of globals.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178239 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_fake_stack.cc
san_globals.cc
san_interceptors.cc
san_internal.h
san_poisoning.cc
san_poisoning.h
san_rtl.cc
san_thread.cc
6e7dca77e5e28ba4411edeadc2cfb7a4e296cef6 28-Mar-2013 Alexey Samsonov <samsonov@google.com> Fix unmatching ASan runtime flag for init-order checking exposed by r178158. Add a test for r178158.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178229 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
c9424276474a27bd7b6ae59e771371f850a08ba1 27-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Demangle global names in error reports.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178131 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
it_tests/global-demangle.cc
05e16a028d26503153a8fe512a500676cad66031 26-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Change the ABI of __asan_before_dynamic_init function: now it takes pointer to private string with module name. This string serves as a unique module ID in ASan runtime. compiler-rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178014 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_interface_internal.h
san_rtl.cc
be52366ff2500f11133fd6089f349e93bd5f4822 26-Mar-2013 Dmitry Vyukov <dvyukov@google.com> asan/tsan: move strcasecmp() interceptor to sanitizer_common


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178010 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
a89a35acf3004de3e39f1074b8620fb3c423d41f 26-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] print thread number while reporting invalid-free and double-free; add tests; also add a test for use-after-poison

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177993 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
it_tests/double-free.cc
it_tests/invalid-free.cc
it_tests/use-after-poison.cc
bff55c4fbebd1f8f64693dea8118d9ee0979d563 25-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Use dynamic symbol table when checking exported ASan runtime symbols

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177868 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Darwin/interface_symbols_darwin.c
it_tests/Linux/interface_symbols_linux.c
39cbb56fb3ba2af53e537107862c51f1dd252150 25-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] mark local function as static

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177862 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
a06fe9183fbffb78798a444da9bc3040fdd444aa 23-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Build and install .syms files alongside sanitizer runtimes. These are used to
specify which symbols are exported to DSOs when the sanitizer is statically
linked into a binary.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177784 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san.syms
a05af3d0f2417cd6516460a46d0381a7345a5837 22-Mar-2013 Timur Iskhodzhanov <timurrrr@google.com> Revert 177745 as it was incorrect

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177746 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
c27d326427a96233aa2b594c73bda108f5a641f4 22-Mar-2013 Timur Iskhodzhanov <timurrrr@google.com> Band-aid fix for the Windows build caused by r177710. Long-term, atomic_compare_exchange_strong should be a template on Windows too...

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177745 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
50f3daa00d3da0a80c8798a3e977705e96ec106f 22-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] Change the way we report the alloca frame on stack-buff-overflow.

Before: the function name was stored by the compiler as a constant string
and the run-time was printing it.
Now: the PC is stored instead and the run-time prints the full symbolized frame.
This adds a couple of instructions into every function with non-empty stack frame,
but also reduces the binary size because we store less strings (I saw 2% size reduction).
This change bumps the asan ABI version to v3.

compiler-rt part, llvm part will follow.

Example of report (now):
==31711==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffa77cf1c5 at pc 0x41feb0 bp 0x7fffa77cefb0 sp 0x7fffa77cefa8
READ of size 1 at 0x7fffa77cf1c5 thread T0
#0 0x41feaf in Frame0(int, char*, char*, char*) stack-oob-frames.cc:20
#1 0x41f7ff in Frame1(int, char*, char*) stack-oob-frames.cc:24
#2 0x41f477 in Frame2(int, char*) stack-oob-frames.cc:28
#3 0x41f194 in Frame3(int) stack-oob-frames.cc:32
#4 0x41eee0 in main stack-oob-frames.cc:38
#5 0x7f0c5566f76c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
#6 0x41eb1c (/usr/local/google/kcc/llvm_cmake/a.out+0x41eb1c)
Address 0x7fffa77cf1c5 is located in stack of thread T0 at offset 293 in frame
#0 0x41f87f in Frame0(int, char*, char*, char*) stack-oob-frames.cc:12 <<<<<<<<<<<<<< this is new
This frame has 6 object(s):
[32, 36) 'frame.addr'
[96, 104) 'a.addr'
[160, 168) 'b.addr'
[224, 232) 'c.addr'
[288, 292) 's'
[352, 360) 'd'




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177723 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_internal.h
san_report.cc
san_thread.cc
san_thread.h
it_tests/Linux/zero-base-shadow.cc
it_tests/stack-frame-demangle.cc
it_tests/stack-oob-frames.cc
it_tests/stack-overflow.cc
it_tests/use-after-scope-inlined.cc
ests/asan_test.cc
dfe3f9691d4700981566a4b57e1e482f72783950 22-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix-up for r177634 on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177711 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
7dd282c0c7d3ca32ee94092289bd802e16fe9867 22-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Fix an error on invalid deallocation in ASan allocator. When ASan checks if memory freed by user was indeed previously allocated, it first does an atomic write to presumed location of chunk header. This is wrong, as if the free is invalid, we may overwrite some valuable data (like other fields of the chunk header). Fix this by using atomic_compare_exchange instead.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177710 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_test.cc
195369bb7f59896487c4542716ca9c5d53975e78 22-Mar-2013 Dmitry Vyukov <dvyukov@google.com> asan: fix lint warning about line length


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177709 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
def1be9b7ef4091ce465c0fbfb26cdb52128ade8 21-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Switch ASan to generic ThreadRegistry from sanitizer_common. Delete ASan-specific AsanThreadRegistry.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177634 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator.cc
san_allocator2.cc
san_fake_stack.cc
san_interceptors.cc
san_linux.cc
san_mac.cc
san_malloc_linux.cc
san_malloc_mac.cc
san_posix.cc
san_report.cc
san_report.h
san_rtl.cc
san_stats.cc
san_stats.h
san_thread.cc
san_thread.h
san_thread_registry.cc
san_thread_registry.h
c25e62b0cdbca855e7611583b0ff7013c31db21d 20-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Move malloc stats collection away from AsanThreadRegistry class.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177508 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator2.cc
san_mac.cc
san_malloc_mac.cc
san_stats.cc
san_stats.h
san_thread_registry.cc
san_thread_registry.h
89c1384464848c1ad041becf8b97936fa10de21b 20-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Move GetCurrentThread/SetCurrentThread from AsanThreadRegistry class into plain functions: they don't actually use registry

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177501 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator2.cc
san_fake_stack.cc
san_interceptors.cc
san_linux.cc
san_posix.cc
san_report.cc
san_rtl.cc
san_thread.cc
san_thread.h
san_thread_registry.cc
san_thread_registry.h
eb98c4da7c02ada2be365518931613b44fc06b18 20-Mar-2013 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge_2012_03_18

Change-Id: I45a9f74b42eae6a1fe5320a46a3a562eee0a8357
e1ba0009d5be18d513ffd29c1b6fccea1a3bffa0 19-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] s/ASAN_POSIX/SANITIZER_POSIX/


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177407 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
30e110edf92303237d471f1cb8e3ad07954fb145 19-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] More renamed macros.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177401 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_mac.cc
san_malloc_mac.cc
san_malloc_win.cc
san_win.cc
24e13723f8477d8c42ab8b2a7f4f69fc089842f1 19-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Replace more platform checks with SANITIZER_ constants.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177400 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
san_linux.cc
san_mac.cc
san_mac.h
san_malloc_linux.cc
san_malloc_mac.cc
san_malloc_win.cc
san_new_delete.cc
san_posix.cc
san_preinit.cc
san_stack.cc
san_win.cc
83cb7877f608eb9b3d65981095216842f686c527 19-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Move ASan platform macros to sanitizer_common and rename them appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177397 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_mac.h
san_malloc_linux.cc
san_mapping.h
san_new_delete.cc
san_rtl.cc
san_thread_registry.cc
18ec84c543243310a8ca3e64a1d851bc43e5fa39 18-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] make the __asan_get_heap_size more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177270 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
00545a3625aaa765eef2da9b3e197a0e00e94550 18-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Switch to allocator2 on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177263 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
ests/asan_test.cc
60c9f441255211f17c4d355ead94392ba1841355 18-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] while generating the description of a global variable, emit the module name in a separate field, thus not duplicating this information if every description. This decreases the binary size (observed up to 3%). https://code.google.com/p/address-sanitizer/issues/detail?id=168 . This changes the asan API version. compiler-rt part, llvm-part will follow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177253 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_internal.h
san_report.cc
ff5d1fcdd74036fa15d96fafd487397ebf5f202e 15-Mar-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Don't intercept frexpf and frexpl on Windows. Add frexp declaration to asan_intercepted_functions.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177155 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
d39a34ee33aae73fdde065f784bdc19f67b91ae2 14-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] remove one redundant malloc stress test, unify the usage of ASAN_LOW_MEMORY macro in tests, slightly reduce test memory usage (all to make 32-bit runs consume less RAM)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177069 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_noinst_test.cc
ests/asan_test.cc
ests/asan_test_config.h
c1b3c5293f12f932615b1545555ba002f321d04c 14-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] remove -fsanitize=init-order from lit tests as now it's implied by -fsanitize=address

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177064 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/initialization-bug-any-order.cc
it_tests/initialization-bug.cc
566c0a1f1c584c00deaed6fafb5d65abd32e1aca 14-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] turn off checking initialization order in ASan runtime by default. Instead, it should be turned on by default in the compiler

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177058 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
it_tests/Linux/initialization-bug-any-order.cc
it_tests/initialization-blacklist.cc
it_tests/initialization-bug.cc
it_tests/initialization-nobug.cc
1a25379bd42f42759cb89bc8698477c3e6bd418b 14-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] make ASan assume ASAN_OPTIONS=symbolize=1 if ASAN_EXTERNAL_SYMBOLIZER is defined

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177036 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
a7e5db966299a50c0e68cf9d35e1130b6c024c94 13-Mar-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176940 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
af9297b9be5e8993326c87ed32e44a8d2a5d7598 12-Mar-2013 Kostya Serebryany <kcc@google.com> [asan] use 4Tb of address space for the asan allocator instead of 1Tb. This increases the memory available for a single size class from 16Gb to 64Gb. The total VM footprint becomes 20Tb

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176857 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ff571e2cf5d4a55f7719cd63f05f11c3840f0f57 06-Mar-2013 Stephen Hines <srhines@google.com> Update build rules for compiler-rt merge to version 176091.

Change-Id: I17f4c807f11982e095994e3e0747483b32ffe453
ndroid.mk
53fb6ea24db1193246be4a02e946fd14bc3f053d 06-Mar-2013 Stephen Hines <srhines@google.com> Merge commit '405056ccecb28f0c1babf23596d6b822d2b544ee' into merge_20130226

Conflicts:
lib/asan/tests/asan_test.cc

Change-Id: I72d45308752026b7d2ba586379c287356685e96e
d4de2a1a7b15d0ed1a303b1604894ae82d5e8748 01-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Revert r176255, r176264.

New allocator has 1.5x memory overhead of the old one.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176340 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
ests/asan_test.cc
df4f6de48d1efe0cf6ed0a7b867e86b45985e85a 28-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Lower memory usage in LargeMallocTest on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176264 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
8bd5e74fa9d37a182088114918380e255e22e493 28-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Add the memcmp_strict flag (1 by default) that controls the behavior of accessibility checks in memcmp.
1: memcmp(p1, p2, n) always checks n bytes
0: memcmp checks up to n bytes depending on whether the memory contents differ.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176256 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_interceptors.cc
san_rtl.cc
it_tests/memcmp_strict_test.cc
d91046de8b90d78280ec378fce6f3da8cbfd786a 28-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Enable allocator2 on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176255 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
13577fed9ac2ebe5e4800b8f83e3a80832907de2 28-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] bump kMidMemEnd to 0x4fffffffffULL since in rare cases prelink uses addresses higher than 0x3fffffffff

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176250 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
san_rtl.cc
it_tests/Linux/asan_prelink_test.cc
b9e1319f97a9d9c2d13090e162e66ebdfbb419dd 27-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] if calloc returns a freshly-mmaped memory, don't clear it with memset. Speeds up calloc-intensive code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176185 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_noinst_test.cc
f155fccd1f26f771c9f7f265a4c30faebdfb214f 26-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] a bit stricter lint for CHECK vs CHECK_XX (these CHECK_XX really help debugging!)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176085 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
1b057b20db71ec6cc2bac460c8b2848f0889d47d 26-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] fix the output for range accesses (memset, etc); improve the tests; more strict checking in memcmp

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176078 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ests/asan_mem_test.cc
ests/asan_test.cc
00b8a34250e9f6c1c0211c33f4fe4da15d0fb24a 26-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] use the new attribute syntax (no_address_safety_analysis => no_sanitize_address)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176077 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/default_options.cc
it_tests/throw_call_test.cc
33934fff43c5813394fe21e68b8d82b672013465 22-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] move the .preinit_array hack into a separate file (added used attribute)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175871 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_intercepted_functions.h
san_preinit.cc
san_rtl.cc
bc3a2d13e65b22f7920d2d963912e9af2e55fdc2 21-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] temporarily disable alloc_dealloc_mismatch on Mac, since the previous commit caused error reports in gTest.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175766 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
d4228010624f7c6fa69934add3f9da46cc6b6918 21-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Make sure operator new/delete and friends are intercepted on OS X.
Because the interceptors will reside in a dylib, not the main executable, we can't just declare them,
but must use the interposition machinery.
Fix the test expectations in large_func_test.cc affected by the change.
This CL should make our Mac buildbots green.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175763 91177308-0d34-0410-b5e6-96231b3b80d8
san_new_delete.cc
it_tests/large_func_test.cc
ed3cb6b5f15ab375bbe6a90ccbe8d69bb1f36fe0 21-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Declare CreateThread as extern "C" to fix the Windows build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175760 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
72bbfd4f3a442afde281476bc6bd41b3b2152a4e 21-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Revert the incorrect macro on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175745 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
c4f88e4e6732f3fec8976e2b56e453d20b047845 21-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Put several function prototypes back under #ifdef _WIN32 to fix the Windows build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175743 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
50a002ecad3f0a10c136496e5b6289bd3c71590e 21-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Refactoring: nuke the redundant function declarations in asan_intercepted_functions.h
that had been used on OS X only.
The INTERCEPTOR() macro on OS X is now responsible for declaring the wrapped function, the wrapper and the
pair of pointers to them in __DATA,__interposition section. Thus adding an interceptor requires editing a single file now.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175740 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
san_mac.cc
a84805f1ccb2b7d4b6c0ba384bd3541fa4eaf808 21-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] speedup by more than 2x handling of the small memset/memcpy/etc calls

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175728 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_mapping.h
ests/asan_noinst_test.cc
4c3e573425e584867e12c3f5d3df524c20b06509 20-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] revert part of r175631 that looks like accidental commit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175655 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
7c2a3bbabc7d3bcc66ad7a076bed9a4b86a3626d 20-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Delete asan/dynamic dir and temporarily move the interposers declarations to asan_intercepted_functions.h
Now that we have only one dependency on asan_intercepted_functions.h, we can unite that code with the interceptors declarations in asan_interceptors.cc and get rid of asan_intercepted_functions.h


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile.mk
san_intercepted_functions.h
ynamic/Makefile.mk
ynamic/asan_interceptors_dynamic.cc
ests/asan_test.cc
a8e0989e1829e6d1eb898b899ff8dced795ab5b6 20-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] move preinit_test to Linux since on Mac __asan_init is called from ld-preload-ed runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175625 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/preinit_test.cc
it_tests/preinit_test.cc
e1353430866fe112de0f52ab6281dbc47e40ef66 20-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] on linux, run __asan_init from .preinit_array (even earlier than before)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175623 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_rtl.cc
it_tests/preinit_test.cc
f882247088952deed954a19d745c2dd8871e2035 20-Feb-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] use raw syscall instead of _exit() function on Linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175622 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_rtl.cc
97234eb4239b64c2f55f4dcec8c061d2b7f51505 20-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] add a lit test for invoke-with-no-return instrumentation

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175618 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/throw_invoke_test.cc
69b109a665247d424874253b412fe9b5253d1702 20-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Fix lint.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175615 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/throw_call_test.cc
a1b5c09e608933cb2a9edef1488f45f5a94c91a3 20-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] add test throw_call_test (broken with -static-libstdc++)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175614 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/throw_call_test.cc
7f4df1a0e1e1b2ace94d4d78b03c222887dbb00c 19-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] don't run the long double test if long double is the same as double

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175514 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
36ea94dc39f0ed98663986f6c0409dfc0a5edeb5 19-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] Allow ASan default runtime options be overriden at compile time by providing ASAN_DEFAULT_OPTIONS macro

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175512 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
366984e3aa286f7b4fb45f5c9e703f2768c407ed 19-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] instrument memory accesses with unusual sizes
This patch makes asan instrument memory accesses with unusual sizes (e.g. 5 bytes or 10 bytes), e.g. long double or
packed structures.
Instrumentation is done with two 1-byte checks
(first and last bytes) and if the error is found
__asan_report_load_n(addr, real_size) or
__asan_report_store_n(addr, real_size)
is called.

asan-rt part

Also fix lint.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175508 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_rtl.cc
it_tests/Darwin/interface_symbols_darwin.c
it_tests/Linux/interface_symbols_linux.c
ests/asan_test.cc
9358c58d0aaf1b20f17362af354d4c3c1309276a 19-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Add interceptors for localtime and friends.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175499 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
d843fea3d6f7e7dcfcb6e2a98826b85e5106f189 18-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] enable asan_prelink_test when gold is the default linker (gold and bfd linker have different flag syntax)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175431 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/asan_prelink_test.cc
8e32db4efc90a4d136786b4bdda62363df99e12c 18-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] added flag -d|--demangle to asan_symbolize.py, makes addr2line/llvm-symbolizer demangle the functions names

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175429 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
180e988700858a838e00fe9406f170502c203b85 15-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] make variables unsigned to silence warnings - attempt 2

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175285 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
e6b91fdad54c4c9a711b5149d65ea6a6f368d9ab 15-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] make variable unsigned to silence the warning

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175284 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
fe984cc9d8aa86cf6d5aa802b223a588d6f14105 15-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Fix https://code.google.com/p/address-sanitizer/issues/detail?id=159
MaybeReexec() does now a tricky job to manage DYLD_INSERT_LIBRARIES in a safe way.

Because we're using library interposition, it's critical for an instrumented app
to be executed with the runtime library present in DYLD_INSERT_LIBRARIES list.
Therefore if it's initially missing in that list, we append the runtime library name
to the value of DYLD_INSERT_LIBRARIES and then exec() ourselves.

On the other hand, some of the apps exec()ed by our program may not want to have
ASan runtime library preloaded, so we remove the runtime library from the
DYLD_INSERT_LIBRARIES if it's already there.

Users may want to preload other libraries using DYLD_INSERT_LIBRARIES, so we preserve those.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175276 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
it_tests/Darwin/unset-insert-libraries-on-exec.cc
e31eca900a1f8849af75100c2d92e838d79d0920 15-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] make asan work with 7fff8000 offset and prelink

When prelink is installed in the system, prelink-ed
libraries map between 0x003000000000 and 0x004000000000 thus occupying the shadow Gap,
so we need so split the address space even further, like this:
|| [0x10007fff8000, 0x7fffffffffff] || HighMem ||
|| [0x02008fff7000, 0x10007fff7fff] || HighShadow ||
|| [0x004000000000, 0x02008fff6fff] || ShadowGap3 ||
|| [0x003000000000, 0x003fffffffff] || MidMem ||
|| [0x00087fff8000, 0x002fffffffff] || ShadowGap2 ||
|| [0x00067fff8000, 0x00087fff7fff] || MidShadow ||
|| [0x00008fff7000, 0x00067fff7fff] || ShadowGap ||
|| [0x00007fff8000, 0x00008fff6fff] || LowShadow ||
|| [0x000000000000, 0x00007fff7fff] || LowMem ||

Do it only if necessary.

Also added a bit of profiling code to make sure that the
mapping code is efficient.

Added a lit test to simulate prelink-ed libraries.
Unfortunately, this test does not work with binutils-gold linker.
If gold is the default linker the test silently passes.

Also replaced
__has_feature(address_sanitizer)
with
__has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
in two places.

Patch partially by Jakub Jelinek.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175263 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_mapping.h
san_rtl.cc
it_tests/Linux/asan_prelink_test.cc
634b0734feae68b68106d52f6ef1c6893fff1381 14-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Fixed the wrong placement of #include


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175157 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Darwin/reexec-insert-libraries-env.cc
c18e17980cf6e28e736432b780cd3ae91b6597be 14-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Remove the 'alarm' script which isn't present on OS X by default.
The test may hang now if a regression occurs.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175155 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Darwin/reexec-insert-libraries-env.cc
c74b2ccbc0cf40bb401ebf3758e8e964b22acb3a 14-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] use short path for sanitizer_common/tests/sanitizer_test_utils.h, add -I sanitizer_common/tests to asan/tests/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175142 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_test_utils.h
8da17ea3bc3ba0a28844642921247a3b9a1a3bcd 14-Feb-2013 Kostya Serebryany <kcc@google.com> [tsan] disable a failing test until it gets fixed. fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175137 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
eb5f427c10c5d23e520def5f921cbbed831526be 13-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] When re-executing the process on OS X, make sure we update the existing DYLD_INSERT_LIBRARIES correctly.
Previously ASan used to hang in an exec loop, because it failed to overwrite the env var value
(see https://code.google.com/p/address-sanitizer/issues/detail?id=159).



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175059 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
it_tests/Darwin/reexec-insert-libraries-env.cc
it_tests/SharedLibs/darwin-dummy-shared-lib-so.cc
606d3bc68a071c35acd0490678ce9ebc4c7e6332 13-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] fix fixed mapping for mac (ASAN_FLEXIBLE_MAPPING_AND_OFFSET=0)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175049 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
867ac63fdc4d5aec1c1d66858937cf787af86105 13-Feb-2013 Kostya Serebryany <kcc@google.com> [tsan] simplify tsan-vs-gvn test since gvn vs tsan is now fixed; fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175037 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_internal.h
2cf585e94866c97528b0743b1e4c01f779fa500f 12-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Add new __isoc99_*scanf to ASan intercepted functions list.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174965 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
ea0fd3c6f60a9e783dbfbb8a473ac60cd22eb07f 12-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174958 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface_internal.h
san_mapping.h
70910beddc5362ce479d1953bbdc010d0b585124 11-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Fix line numbers in a sanitizer lit test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174861 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/use-after-free-right.cc
ed83584256249ee2c474fb18abf7df6aa73019b0 08-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Fix off-by-one in AddrIsAtRight.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174710 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
it_tests/use-after-free-right.cc
2b10d3944d911c07f2a10cf248300260ed67454a 08-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Switch Windows to allocator v2, also fixing some build errors

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174707 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
400a946f7300de3db5c50585e3b0aff2ac3c6509 08-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Move functions using BitScan/clzl to sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174706 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
719cf0e5d7dafdf2758bb1e6324181dcb60bfd3c 07-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Remove the replace_cfallocator flag, which is used no more.
See https://code.google.com/p/address-sanitizer/issues/detail?id=10 for the context.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174629 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
5d48617936d6415f2037a5e1b9d57f9077ee92ef 07-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Enable alloc_dealloc_mismatch by default on Darwin.
Enable AddressSanitizer.AllocDeallocMismatch tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174628 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
ests/asan_test.cc
ed4c034955e33b999b37f735feec8a7c315a6e3d 07-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Enable the new and delete wrappers on Darwin.
Also fix large_func_test.cc, which got broken when we switched to allocator2: the OOB access was too far from the original allocation, so ASan decided to describe the next one.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174626 91177308-0d34-0410-b5e6-96231b3b80d8
san_new_delete.cc
it_tests/large_func_test.cc
6a11cc1bc665f13a0fcafe4a6a84761216675af7 07-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Implement asan_mz_size(), asan_mz_force_lock() and asan_mz_force_unlock() for allocator2.
Switch to allocator2 on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174603 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
427a89947a52bbaaa6adfaae7aa8e44ec588f43d 06-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] fix the interceptor for siglongjmp. As we're using dylib interposition, we must intercept both siglongjmp and longjmp on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174510 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
2673fd8406197c42f16cede6d287f72169298c2e 06-Feb-2013 Kostya Serebryany <kcc@google.com> [asan] print a short one-line report summary after the full report. Currently, works only if symbolization happens in-process.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174501 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_report.cc
69563986ca570ce750111a82264d51ddbf4107ba 05-Feb-2013 Alexander Potapenko <glider@google.com> [ASan] Delete the code related to static runtime on OS X.
Nuke lib/interception/mach_override.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174383 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile.mk
san_intercepted_functions.h
san_interceptors.cc
san_interceptors.h
san_mac.cc
ynamic/asan_interceptors_dynamic.cc
f97a1fef66c59ee45e4a286be64c852d0e82275f 05-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Fix Win/Mac build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174376 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
589dcdaa520de1033a0f6112c9b67ab9eb7931af 05-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Fix nonsensical reports of partial right OOB.

In case of partial right OOB, ASan was reporting
X is located 0 bytes to the right of [A, B)
where X was actually inside [A, B).

With this change, ASan will report B as the error address in such case.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174373 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_allocator2.cc
san_globals.cc
san_interceptors.cc
san_report.cc
san_report.h
it_tests/partial_right.cc
it_tests/strncpy-overflow.cc
73700ac2a7ced591261ad11199d9d4a7112304bb 01-Feb-2013 Alexey Samsonov <samsonov@google.com> [ASan] remove debug output from the test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174188 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
859778a4e2dffa4024fa3e13b105fd62eca44b1c 31-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] make the error messages from sanitizer_common contain the actual tool name

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174059 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
c70fa28caaaec2134f2c2230821fcc0f0d7ac27e 31-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] Split ASan interface header into private and public parts. Add a test that makes sure users can include interface header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174058 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator2.cc
san_fake_stack.cc
san_globals.cc
san_interceptors.cc
san_interface_internal.h
san_internal.h
san_malloc_linux.cc
san_poisoning.cc
san_report.h
san_rtl.cc
san_stack.cc
san_stats.cc
it_tests/Darwin/interface_symbols_darwin.c
it_tests/Linux/interface_symbols_linux.c
it_tests/interface_test.cc
ests/asan_noinst_test.cc
250f221ae0dee295098da8aa631977b6c2ebc99b 30-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Further split private and public sanitizer headers.

And make msan_interface.h C-compatible.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173928 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
48ecaf475c7084125ec1985f0ad7efc1b4b8306e 30-Jan-2013 Alexey Samsonov <samsonov@google.com> Use LLVM_BUILD_TYPE instead of CMAKE_BUILD_TYPE in compiler-rt unit tests to match the behavior of llvm unittests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173926 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Unit/lit.site.cfg.in
ba5e99668e3030cc5bab357a04271a1bdbac209c 30-Jan-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] update style checker script and fix namespace style warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173910 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/stack-frame-demangle.cc
a180078ee0120c049f9fb495f930053f80f105aa 29-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173795 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
518908037a5438758ffc7e166176b3b28e8bef78 29-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: fix the test


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173786 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/rlimit_mmap_test.cc
43495a2bfb70206a8e569e1a643a320065427178 29-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix deallocation hook in allocator2: according to specification, dealloc hook should be called before deallocating memory

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173778 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
d91699339fd7e022aef0eaa8f401af0f8942068b 29-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] Do allocate memory even for zero-size allocation requests. Explain why we have to do this in comments.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173776 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_test.cc
a3ab1a7da70a5ef111257ba8887920c1fdcd7be5 28-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix a bug in allocator-v2 which could lead to SEGV on realloc(malloc(0), 4)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173681 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_test.cc
b478260a75516f350f733dccb07cf10e443f9967 28-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] fix a crash in asan stats printing (initialize the allocator in __asan_init)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173676 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_allocator2.cc
san_rtl.cc
95f630ae40cef78fb03b18110eff43bcf8d1c040 28-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] two more internal flags for asan-rt: print_stats (0) and print_legend (1)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173671 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_report.cc
san_rtl.cc
f6acafcaf557fa8f89794ac08597a854475dfc73 28-Jan-2013 Alexey Samsonov <samsonov@google.com> [CMake] Fix compiler-rt tests after r173617

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173668 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
b2efe13f3a0fb9af55cce39a497d951567e78816 25-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] improve the calloc overflow check (spotted by samsonov@)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173443 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
65199f1b253c4bfb225805629217acb8f0b1e185 25-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] fix calloc overflow in asan/tsan/msan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173441 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator2.cc
ests/asan_noinst_test.cc
af5bd2ee59a9f7bea74f43fccc6ea48979b7a4b0 24-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] run-time tests for adaptive redzones

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173336 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_globals_test.cc
ests/asan_noinst_test.cc
ests/asan_test_utils.h
327c60a02a944fc9e3603d2cc6822af9517135d0 24-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] fix compilation on Mac by adding a missing pwrite parameter.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173333 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
ed847e39a3f993e52fd0a290d08cadf723951ea3 23-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] increase the minimal mmap size in allocator to 2^16; fix the asan Mac build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173261 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
e5ab9688b623a5a0150c7eae1ec1caaf06d44758 23-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] initialize kHighMemEnd at startup (instead of at compile time) to simplify further changes for various address space layouts. Fix asan_allocator2 for PowerPC (tested on 44-bit address space)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173260 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_mapping.h
san_rtl.cc
ests/asan_noinst_test.cc
a3b0e5e4f9f48b2ed0baee10c0236eda7c21c660 23-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] simplify the code that poisons global redzones, add some more tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173251 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_mapping.h
san_report.cc
ests/asan_globals_test.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
ests/asan_test_utils.h
9c6243ca4cafa13c52ca26ca9d05ae893e7c1cb3 22-Jan-2013 Stephen Hines <srhines@google.com> Merge "Improve dependency tracking for compiler-rt."
6fcbff5c19dc37c978322e050fba0f1c3bb84bf6 22-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Disable the new/delete implementations for OSX
See https://code.google.com/p/address-sanitizer/issues/detail?id=131


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173149 91177308-0d34-0410-b5e6-96231b3b80d8
san_new_delete.cc
bea4205c7324f71153a6224665bdc04909ceda10 22-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: add output test for -fsanitize-address-zero-based-shadow option on Linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173146 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/zero-base-shadow.cc
bc459cccc292df02314302890a4330840865982f 22-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Remove the declarations of pthread_workqueue_t and pthread_workitem_handle_t, which are used no more.
Kudos to Jeremy Huddleston Sequoia <jeremyhu@apple.com>


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173143 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
3b9e668d6056cf7fb791e630d931ebaaf59b4981 22-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: use Clang -fsanitize-blacklist flag in unit tests (instead of -mllvm)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173142 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
7da5ab2c05bf63d99273f0f033ad544c09432c92 22-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Fix the path to ASan interface in interface_symbols_linux.c


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173140 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/interface_symbols_linux.c
53c3f18447bef0a3b96c66e83564aedadc504a57 22-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Moved interface_symbols.c to lit_tests/Linux.
We already have Darwin-specific version of this test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173136 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/interface_symbols_linux.c
it_tests/interface_symbols.c
eba4803ab538007a63d149faf92afc00f73c5128 22-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Use dylib interposition to hook memory allocation in the dynamic runtime.
This CL drastically simplifies the way we're hooking the memory allocation routines in ASan on Mac by using dylib interposition to replace the main malloc_zone_* functions. This allows us to avoid replacing the default CFAllocator and drop the CF dependency at all.

Committing this patch will result in the static runtime being broken. A follow-up CL will switch ASan to use the dynamic runtime library.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173134 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_intercepted_functions.h
san_mac.cc
san_malloc_mac.cc
ynamic/asan_interceptors_dynamic.cc
it_tests/Darwin/interface_symbols_darwin.c
it_tests/Darwin/lit.local.cfg
it_tests/Linux/malloc_delete_mismatch.cc
it_tests/heap-overflow.cc
it_tests/large_func_test.cc
it_tests/malloc_delete_mismatch.cc
it_tests/strncpy-overflow.cc
it_tests/use-after-free.cc
c92a42161d8c513c01fd1bcaf60387f50cc4981f 22-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: simplify build rules for unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173133 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
5e5be21cc6165ae16a3002f0c3bace10c493491b 22-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: disable flexible mapping and offset on Android. It doesn't work for dynamic ASan runtime there

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173132 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
8fb1264341c079eda3e10480fb807a0f52bb8b19 22-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] split asan_test.cc even more

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173131 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_str_test.cc
ests/asan_test.cc
6cbfae439b81221d2250ffe0331958f130259755 22-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] split asan_test.cc more

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173130 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_mem_test.cc
ests/asan_test.cc
ests/asan_test_utils.h
38db30686c5962f8b5c877e29c6669d72198d42b 22-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] split asan_test.cc to speedup parallel build (most important if building with a debug clang, which takes a couple of minutes on this large file with templates). More splits to follow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173129 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_oob_test.cc
ests/asan_test.cc
ests/asan_test_utils.h
7c98f2da68cc52708ca80555cbf6a03f613a535b 10-Jan-2013 Stephen Hines <srhines@google.com> Update compiler-rt for merge to r171906.

lib/asan/Android.mk
lib/asan/tests/asan_test.cc - std::sort instead of sort !

Change-Id: I732e257ca465fdff13f706bd0090ca747ea91a1b
ndroid.mk
ests/asan_test.cc
db16931e4f0aa3ffcb5bf4a203905c8bd5654751 21-Jan-2013 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/master' into merge-llvm
44997c354c7cdb5257d9a41c837b12a6133f2d6b 21-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] fix linux build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173049 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
8c745fc58d8aca66db1170b1cdbbc0a7743c20a0 21-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Move Mac-specific tests to asan_mac_test.cc



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173048 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_mac_test.cc
ests/asan_mac_test.mm
ests/asan_mac_test_helpers.mm
ests/asan_test.cc
d0b1d4605b05b744480f0ca54f996578ca216cf8 21-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake: generalize checking for target availability and add initial support for PowerPC native arch. With this patch, building LLVM on PowerPC native arch produces a working ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173044 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
87b52b910037447eccb92546b24b5e06181a1545 21-Jan-2013 Alexey Samsonov <samsonov@google.com> Fixup for r173021: build tests with zero-based shadow on Android only, fix condition in checking for shadow gap in asan_mapping.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173026 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
ests/CMakeLists.txt
ests/asan_noinst_test.cc
ee485d42c43635f874e3197f636280a6b0f8c545 21-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: build unit tests with -fsanitize-address-zero-base-shadow on Linux and Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173021 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_mapping.h
ests/CMakeLists.txt
ests/asan_noinst_test.cc
6935071be08d83963a0eaf2377f3fffb8b56f328 21-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Move *scanf declarations out of mac-only section.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173020 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
a0a69a4129fc963702b7f96a00838f104a6b3636 21-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: use dynamic lookup when building dynamic ASan runtime on Mac, because shadow mapping and offset are defined in the instrumented modules instead of runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173015 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
2aed04090856609cdf510b69dd0a1d81b3980b5f 21-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: build runtime library with ASAN_FLEXIBLE_MAPPING_AND_OFFSET=1 as shadow mapping/offset are always emitted by the LLVM backend now

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173013 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
2aad7c137771f6f7a734390e09c94a13120d054a 21-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake: add functions creating universal runtime libraries for several architectures on OS X and use them in ASan and UBSan build rules

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173011 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
250929e797085ddd4ba54fe9872dc25c1647d0a4 20-Jan-2013 Alexey Samsonov <samsonov@google.com> Temporary disable test added in r172828 as it seems to be flaky on the buildbots

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172976 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/log_path_fork_test.cc
it_tests/log_path_fork_test.cc.disabled
97ac43c7cf39e8ad2719b4f395093e7415280577 19-Jan-2013 Stephen Hines <srhines@google.com> Improve dependency tracking for compiler-rt.

Change-Id: Ic6751ce9d692f79f984b9bb94246f5c096853316
ndroid.mk
43b4b9c18a7a588a60b9d976391ad8e2f5f9a309 18-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake: Generalize build rules for different arches for sanitizer_common, asan, ubsan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172829 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
dedba5d6b0664218b1b1109f024a1ab151642776 18-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Fix the log_path option to use different log files for parent and child processes after fork().


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172828 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/log_path_fork_test.cc
392c50d4a56557a51a353509c665188aef115f74 18-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172826 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
82a9080eaff95d69b270cd863e9df63e3b4e59ad 18-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] lint


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172817 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
0ed0f439ae4cec9bb62cf3be61c37596a4ed7087 18-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] kill some dead code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172815 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_rtl.cc
4f32c0beaa83ffbb84db23d2e6205bee57c39ce1 18-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Rename 2 files *.h->*.inc as appropriate.

Also add a missing include.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172814 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
2f3aef010fdeadfe7ec995dc534544acb5f357fb 18-Jan-2013 Alexey Samsonov <samsonov@google.com> CMake variables renaming: X86_64->x86_64 I386->i386

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172812 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
fc4fcf5c6f964f2da6e9875a820eac90399d1deb 18-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Fix compilation on Mac.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172810 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
bee7415a86d9437659d09f034c346794bf15c2ab 18-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Fix Mac build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172809 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
541cfb10f5daa17e48eb42365a74233cd551c545 18-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] fix two off-by-one errors that seem to affect only PowerPC because only there the stack top may be equal to the address space top. Noted by Andreas Schwab in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975#c11 . Also make swapcontext interceptor a bit more robust

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172807 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_poisoning.cc
san_thread.cc
996c4f2fa53cce8f9d7b517073f38569460de505 18-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [sanitizer] Common *scanf interceptors.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172805 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
f1f3182967339d8a2af473e94d39340f464c70cd 18-Jan-2013 Alexander Potapenko <glider@google.com> Remove references to pthread_workqueue_additem_np(), which isn't in the official libdispatch API.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172802 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
ca2849c2819b5c7a8771a1e8bc449cf8f5ef6527 18-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] fixes for Android build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172800 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
c20b321d49f0eff60f1394d56e623d8ca94f24d7 18-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on Mac.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172791 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
ests/asan_test.cc
29b37ea8907bc99bf86fab89bf8dc93a520ebac4 17-Jan-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert r172719, r172721-172723, and r172725.

The r172719 patch broke the build on Mac, the others depended on it.

compiler-rt/lib/asan/asan_interceptors.cc:78:13: error: unused function
'SetThreadName' [-Werror,-Wunused-function]
static void SetThreadName(const char *name) {

Orignal headlines:

[asan] attempting to fix the Mac build
[asan] restructure read/pread/pread64 tests
[sanitizer] move write/pwrite/pwrite64 interceptors to common
[msan] start using common interceptors in msan
[tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172763 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
ests/asan_test.cc
57db4bae483e7268dd7fc5bc42b0e55564014048 17-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] minor changes to swapcontext handling: don't clear shadow memory if context stack is too large

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172727 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_internal.h
san_linux.cc
san_mac.cc
san_win.cc
0fc2f6935568db9252272bd9c00895255d7f78b9 17-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: Allow __asan_get_allocated_size(malloc(0)) to be 0 or 1

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172726 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
9289ff13180a35241d3326be3a8e1edf6f45dc9b 17-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] attempting to fix the Mac build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172725 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
c39ea447d6632314d6e0198b3559830298df5155 17-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] restructure read/pread/pread64 tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172723 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
0223e7dece2c215ed07e2100e1739fa5bf4d8210 17-Jan-2013 Kostya Serebryany <kcc@google.com> [tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172719 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
220ba2f6f98d44e1e8a88b4dee8ed456cf54ff33 17-Jan-2013 Alexey Samsonov <samsonov@google.com> [ASan] fix __asan_get_ownership(p) and __asan_get_allocated_size(p) for the p = malloc(0)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172717 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_noinst_test.cc
c8033193376c3326478a345c4ae6633d4d2862c6 17-Jan-2013 Kostya Serebryany <kcc@google.com> [sanitizer] a bit more unification for interceptors (merge read/pread/pread64 in asan and tsan)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172713 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
e1760eadf00d1cd84c5b314d1b42f6614dff2ed6 16-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: fix the memalign handling (clear the first word of allocated chunk in case there is an old memalign magic)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172603 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
e2399c731b6599f7d608bf5dbbd0b92e1d71fd31 15-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] enable asan_allocator2 by default on Linux. Will enable it on other platforms and remove the old one later, after additional testing. The new allocator is much faster and uses less memory

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172531 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
40265e87a8823589b4af7c3d64fa4194ad91de33 15-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: fix the constant for new allocator cache


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172526 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
48ddbef1d051875b2d0b204e8d78300b58d80a85 14-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Move large part of asan_test_utils.h to sanitizer_common.
Move my_rand() to the common header.

This lets us avoid the use of rand_r in sanitizer_common tests.
There is no rand_r on Android.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172421 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
ests/asan_test.cc
ests/asan_test_utils.h
29e09223b9d4f53f1be528d6a572b66034c26611 14-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: Disable alloc/dealloc mismatch test on Android. It's not supposed to work there

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172398 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
f7de01fc97aea34f94cb76ed33692c2534a1a607 14-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] use the slow CFI-based unwinder when reporting an error. Still use the fast unwinder for malloc/free. Linux-x86-only for now.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172397 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
8f0e311767b783db4a15139dddfe7a924fa3724e 14-Jan-2013 Alexey Samsonov <samsonov@google.com> ASan: Disable alloc/dealloc-mismatch checker on Mac for now (it produces weird false positives on googletest)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172394 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
ests/asan_test.cc
1b2f0306ef6cac2a4c42a80b467a92e9e62b3e5a 14-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: enable allocator version 1 by default


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172392 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
d618867d19e4d278e8040e1529f50287c6a4eea5 14-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan/tsan: fix memory allocator statistics


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172390 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
f4f51f2cc6fa936f0c65577f82e6b62989d546ee 14-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan/tsan: move blocking mutex from asan to sanitizer_common


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172380 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_globals.cc
san_linux.cc
san_lock.h
san_mac.cc
san_rtl.cc
san_stats.cc
san_thread_registry.cc
san_thread_registry.h
san_win.cc
219f1741dad7b8ea07851ac1d96d3b0a99198d44 11-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: fix FIXME on windows


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172226 91177308-0d34-0410-b5e6-96231b3b80d8
san_win.cc
6a2979405346d2916a11c220c222e56eac6ea907 11-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: weaken memory ordering, it's expensive in current implementation


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172210 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
9327e78387122fbb04e3126f2fff721ed784aa51 11-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] fid asan_allocator2 build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172194 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ce17384b74b0dda2e246ce1dedf29b5d46df9c60 11-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: always pass allocator cache to Allocate()


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172193 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
a61ec8172611a75d80e86355352c7b2dd3cb8125 11-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: faster quarantine


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172192 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
8ad3576df9cc1e8fe3c14da7576670686b51e4e6 11-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: set ASAN_ALLOCATOR_VERSION=1 back


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172184 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
9fc0df892cab8735e7de0e86e995a3202c42cf82 11-Jan-2013 Dmitry Vyukov <dvyukov@google.com> asan: Refactor asan memory quarantine.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172183 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
b8a59a0e030d0aacf4df1fe8f7fb4e6f82bab654 10-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] don't fail the test if prctl(PR_SET_NAME) is not supported

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172059 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
b3ef8a4521954d1ca5e728446c389e1f8cc01fc4 10-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: do less work under the quarantine lock; make the strcasecmp test more resistant to the contents of unaddressable memory

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172048 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_test.cc
7125bb35fb2351040534a194c9c1aa8cb71cfb19 10-Jan-2013 Kostya Serebryany <kcc@google.com> [asan] better protect the tests from memset/memcpy inlining, explicitly include unistd.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172045 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
13ddcf695e10bed51faceff49469e1c83d64b51c 29-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] make LargeOOBInMemset test resistant to clever compiler optimizations

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171223 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
17a7c6763224300f6740b5e7fae274734afec675 29-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a new interface function __asan_describe_address, useful for running asan-ified binary under a debugger (e.g. gdb)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171217 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_rtl.cc
c0d37b35439897aea821319a669832b16848cb65 28-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix a build warning

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171200 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
eb2809311c94b73c269ccef8d68ae368642e5754 28-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] implement more strict checking for memset/etc parameters. Instead of checking the first and the last byte, we check the entire shadow region. This costs ~10 slowdown for the instrumented functions. Motivated by a nasty memset-buffer-overflow-by-140-bytes in chrome which was reported as a use-after-free or not at all

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171198 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_poisoning.cc
san_rtl.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
a6d4cf7c4be9b81793ea6be63c4b92d9c162a66c 28-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] use macro instead of raw __attribute__

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171188 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
55425eb7ad3f18a1f740e0e445bc79a012429766 28-Dec-2012 Alexey Samsonov <samsonov@google.com> Make ASan and TSan tests a bit less brittle with @LINE FileCheck macro

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171181 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/initialization-bug-any-order.cc
it_tests/global-overflow.cc
it_tests/heap-overflow.cc
it_tests/large_func_test.cc
it_tests/null_deref.cc
it_tests/sanity_check_pure_c.c
it_tests/shared-lib-test.cc
it_tests/stack-overflow.cc
it_tests/strncpy-overflow.cc
4b48f4563ca25d8915155acc5837e195cf0e5c57 27-Dec-2012 Kostya Serebryany <kcc@google.com> [sanitizer] add statistics to the allocator; fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171161 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_allocator2.cc
san_stats.cc
d7d7b5f39cf5bbc36403afb0a94d473519c7ab78 27-Dec-2012 Alexey Samsonov <samsonov@google.com> Define COMPILER_RT_CAN_EXECUTE_TESTS variable on platforms where we can produce working binaries and use it in build rules for sanitizers tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171160 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
it_tests/CMakeLists.txt
ests/CMakeLists.txt
478b4932f7af7c7a35c07399f2b977efe236453d 27-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] enable alloc_dealloc_mismatch by default

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171147 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
42383abd153b1843fa2695542065fa956ebb41ad 27-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] relax asan/lit_tests/malloc_delete_mismatch.cc to make it pass on Mac 10.7 (where extra frames creep in between malloc and main)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171145 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/malloc_delete_mismatch.cc
a54aec8ca2e372b1a841d605d53cab5e336aeb03 27-Dec-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] when unmapping a chunk of user memory, apply madvise(MADV_DONTNEED) to the corresponding chunk of shadow memory. Also update sanitizer_allocator64_testlib.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171144 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
9c92748b8fa3b833924138a6ae1e653972c9de3b 26-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] Teach ASan to print demangled function name when describing stack frame

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171112 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
it_tests/stack-frame-demangle.cc
709a33e1cf20eb7f00653fe32dc07714b3f2c633 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: do not align the requested size to the redzone size (saves a bit more memory)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171111 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_malloc_linux.cc
ests/asan_test.cc
c35314a119aba6d5e7fa0a06024f9cb1c49e6f5f 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: implement adaptive redzones. Now with asan_allocator2 allocations <= 48 bytes have 16 byte redzone, allocations of 48-96 bytes -- have 32 bytes redzone, etc (max redzone is 2048). If ASAN_OPTIONS=redzone=n is set, it changes the minimal redzone size

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171107 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_rtl.cc
ests/asan_test.cc
9e3bd38388a7c182db57f6e3fc0943e6d12f012e 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: by default use the StackDepot to store the stack traces instead of storing them in the redzones

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171099 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_flags.h
san_rtl.cc
san_stats.cc
111a0716d714aa2597e333d160cf1f271695bab7 26-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: store the user requested size in just 32 bits (larger sizes use metadata). This allows to put one more 32-bit field into the chunk header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171089 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
f1877cf0a314f407ac535ab1606fdac4f9b05026 25-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a test for right OOB with special large sizes. Fix this test in asan_allocator2. More test tweaking for allocator2

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171058 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
e52810d7144ca35bbaeca0b28d138b386ab90243 25-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] properly define ASAN_LOW_MEMORY. Due to a mistake it has been always true causing redzone and quarantine sizes to be smaller than it was some time before (and out of sync with the documentation). Also make one test less greedy

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171052 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
ests/asan_noinst_test.cc
68d3a1bae35be595faf7d9f028a268f390501029 24-Dec-2012 Kostya Serebryany <kcc@google.com> [sanitizer] fix gcc warnings, enable one tests under asan_allocator2

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171036 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
cab6133c5d7478e96882cb54467e29b3716c0d89 21-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2 fix two asserts that happen on full chrome: a) memalign called with 0 size and large alignment and b) malloc called after TSD has been destructed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170900 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
032e833059a673a21facc8e726b5c0c9d1a13d2e 21-Dec-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] CMake build rules for unittests: depend on headers when compiling a file with custom clang.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170897 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
e11c5c5a8cd6e448ddf3c69f783eb655cf4aab01 21-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: better memory stats

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170888 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_stats.cc
03ef193f5310f62989285d88cd0e54e05f927769 21-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Fix another FileCheck pattern to be c++filt-proof.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170878 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/malloc_delete_mismatch.cc
32b8991f961e585ccfe1710f5402a14b4e44cecc 21-Dec-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Don't implicitly add object files to the list of dependencies when building compiler_rt unittests. Fix sanitizer_common and asan build rules accordingly. This also fixes check-sanitizer command on Ninja.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170870 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
fe6d91684bcda766593800f6307233f1a33d31f6 21-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a flag alloc_dealloc_mismatch (off by default for now) which finds malloc/delete, new/free, new/delete[], etc mismatches

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170869 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_allocator2.cc
san_flags.h
san_mac.cc
san_malloc_linux.cc
san_malloc_mac.cc
san_malloc_win.cc
san_new_delete.cc
san_report.cc
san_report.h
san_rtl.cc
it_tests/deep_stack_uaf.cc
it_tests/malloc_delete_mismatch.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
be9796d7148b89f20ca04ffdf3fa98ac84bd1141 21-Dec-2012 Richard Relph <Richard.Relph@amd.com> Clean up some warnings that become errors. Seen in Xcode.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170843 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_mac_test.mm
ests/asan_test.cc
e01f96be0daecec81f41b46377508885d83bb584 20-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] remove duplicate entry in shadow byte legend

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170701 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
b34cf49e723cf28a27ce3a785da937d82c6484b9 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: implement memalign

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170697 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
ests/asan_noinst_test.cc
1894f4a6827c55122fc24a931766c29705ec0bfb 20-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Make the FileCheck pattern more c++filt-resistant.

This test didn't pass for me locally because of "T0's stack" being converted to "T0'short stack" by c++filt.
Strange enough this doesn't show up on our bots.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170690 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/use-after-scope-inlined.cc
c311105fd64219bb96b6467c3707ebda355be87b 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add memalign tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170687 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
73bad81febb2a872627c03e579beea1da4b49294 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add a flag poison_heap to allow better allocator benchmarking, implemenet malloc_stats() on Linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170685 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_flags.h
san_malloc_linux.cc
san_poisoning.cc
san_rtl.cc
376bab8add6be88f649ef1a9127c7d39e76e5f7b 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: make all remaining tests pass.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170680 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_thread_registry.cc
ests/asan_noinst_test.cc
0b770b48e4ae053a7d0610e1c682405afba58fda 20-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add ASAN_PCRE_DOTALL to two new multi-line regexps

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170677 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
2f66ab25cbb000289b79bca042b4136d92331b44 20-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't use -fsanitize=address linker flag for unit tests on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170670 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
c47a45154543b5eba68c9473d3ed807927027cf3 19-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] explicitly link with dynamic ASan runtime when building unittests on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170552 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
bf231869c38e1d635c974781357f6ac3de65fb79 19-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] Support building both 32- and 64-bit unit tests if we can target both architectures

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170549 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
e3091193af47f4932b42ba1773416dfeb3aa2e87 19-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: add mmap/munmap stats

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170548 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_stats.h
san_thread_registry.cc
8925b71d67f03065e1c3871c4474e91bcb88f999 19-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] make sure Android unittests depend on ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170543 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
02dcc63dde3106c24999040768a5eb52f99fedda 19-Dec-2012 Alexey Samsonov <samsonov@google.com> Significantly change the way we build ASan unittests in CMake
build tree. Now just-built Clang is used to:
1) compile instrumented sources (as before);
2) compile non-instrumented sources;
3) compile our own instrumented version of googletest;
4) link it all together using -fsanitize=address flag
(instead of trying to copy linker behavior in
CMake build rules).

This makes ASan unittests pretty much self-consistent
and independent of other LLVM libraries.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170541 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
37a14418e494d3dfb27cd6bddcd9855df2c80ff5 19-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Change the boilerplate check in the libdispatch tests to fix them.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170531 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
9514a53d7b56be6302c666291b21c0387f7ceca8 19-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] print the shadow bytes in different colors and also output the shadow byte legend

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170520 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
2592d766401edb3d36676f1f522592f1d5fb2b07 19-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: improve FindHeapChunkByAddress to find memory chunks to the left of a given address. Almost all tests pass with the new allocator now, only 6 are left to fix.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170511 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
58f54555c2528f863e211a0679c2c423cfa55fb2 18-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add some colors to asan output if printing to tty (following ubsan)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170418 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
a93c02c74f6350b4ca6358978d8175ebb6ac3604 17-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: implement malloc_usable_size and fix 32-bit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170339 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
c523d17b22924aec8d7cf2dc1f68155c02043074 17-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_allocator2: don't use TLS and fix calloc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170329 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_allocator2.cc
d4d2594c02c9fdf40072fa36446eef200abdf8e5 17-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_alocator2: implement quarantine and Reallocate

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170315 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
c88059cf6e0b47951413107ae8d7a0caabe661fc 17-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] implement AsanChunkFifoList via IntrusiveList<AsanChunk>

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170313 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
0a504ec7c360ecfaad8db8607862bc69ed77abfa 17-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] asan_alocator2: implement free() stacks and actually make malloc/free stacks work

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170310 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
1503e9b9ca92e78f2a16e32717cdd5156606400c 14-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] more asan_allocator2 code: record the allocation stack trace, implement calloc/etc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170193 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
bc9940eedb51dd43d844a4c46e17bc89f872781f 14-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] more asan_allocator2 code: actually un/poison shadow on malloc/free

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170190 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_poisoning.cc
49d616ec42ab420ce3ebcbe846b21e3729adf5ac 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] pop the internal stack frames in SlowUnwindStack, extend the test to check this

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170124 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
it_tests/Linux/malloc-in-qsort.cc
06abe7fa574012ada5c0474f60eb6398e0c1a808 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] extend overflow-in-qsort.cc to check both unwind kinds. One more test for SlowUnwind. Move both to Linux dir (no slow unwind on Mac)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170122 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/malloc-in-qsort.cc
it_tests/Linux/overflow-in-qsort.cc
it_tests/overflow-in-qsort.cc
2201cc4385c85d6ec3ad32b71dcd9c22b27beec6 13-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] Allow leading underscore in function name to please output tests on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170121 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/overflow-in-qsort.cc
570c2a0e0a00a2a80ad3403139dddad2bfe75122 13-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't print memory stats on CheckFailed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170120 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
52c06849f842ae3893c7520b7a45ba21e95a4f30 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix win build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170119 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_win.cc
a1ff0d114ecec5811b9eff28586b3ab902028d30 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix mac build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170118 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
a30c8f9eac981dcf137e84226810b760e35c7be1 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add two asan flags: fast_unwind_on_fatal and fast_unwind_on_malloc to allow using the slow CFI-based unwinder

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170117 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_flags.h
san_interceptors.cc
san_linux.cc
san_mac.cc
san_malloc_linux.cc
san_malloc_mac.cc
san_malloc_win.cc
san_new_delete.cc
san_report.cc
san_rtl.cc
san_stack.h
74737d595c4e3638b980bd88b0492247ae4318fa 13-Dec-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Add new header - sanitizer_platform_interceptors.h, which should define whether or not given function should be intercepted on a given platform.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170115 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
8ffd87791a5376d44edfa288cbf469702edbfa22 13-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] one more macro for 'read' interception

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170114 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
c333dffb81f1d85483d657c254c17f636ab192c5 13-Dec-2012 Alexey Samsonov <samsonov@google.com> [ASan] more macro for conditional interception of pread functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170112 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
ests/asan_test.cc
308dd557f002c747500fdd2603a35c9675461491 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add asan/lit_tests/overflow-in-qsort.cc (not fully working yet)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170111 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/overflow-in-qsort.cc
6afa1b0406f5cce7256d4f8717bfe394a16999b5 13-Dec-2012 Kostya Serebryany <kcc@google.com> [sanitizer] replace size_t with SIZE_T in interceptors (same for ssize_t, off_t and off64_t). This is done to avoid confusion and to make the code work with compilers that define size_t w/o any includes (MSVC)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170103 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
b1cc4e448f35515e737ac4969aaa04f3fa3af10a 13-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix the Android build (pread64 interceptor again)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170098 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
ada9ba14325df9e206f454c50bd1b55ea9ecdbb9 12-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Fix test expectations for strcat/strncat.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169987 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
214621f7663896987dc509561c762460226c68c2 12-Dec-2012 Kostya Serebryany <kcc@google.com> [sanitizer] add OnMap/OnUmap callbacks to the allocator interface

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169985 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator2.cc
san_intercepted_functions.h
ef8dfd8dffbf4385baf24e5aaea6c2cc7c6c936a 12-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Enhance OOB tests to check for access type (read or write).



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169974 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
2ca12220769c11d490ace922c4f8b8ce5c3ee0d0 12-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Fixed a compiler warning.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169972 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
1f5e23e3204961456d4c7a9b45060597d4ff69af 12-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] fix compilation on Mac.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169969 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
6e6a7cfe0aac66eeefdf36dec78d7c536bff3c90 12-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix android build and lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169968 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
8530e2b953f0b34ecd267a6aba5f155d5c08c5c8 12-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169966 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ests/asan_test.cc
84a996fc1057ffea9213608c47a54c3d3d3aed02 11-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] more code for asan_allocator2: basic Allocate/Deallocate code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169864 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator2.cc
8416e2110049d4f53f790b2486c6f1add6729ea4 11-Dec-2012 Timur Iskhodzhanov <timurrrr@google.com> ASan: fix lint problems introduced

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169857 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
d923f2bf44ba4a839a39042ba661ff7ee931897a 11-Dec-2012 Timur Iskhodzhanov <timurrrr@google.com> Hopefully fix the Windows build (2)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169856 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
4e773526d9f0c7040345468e51bef8f9b3079f45 11-Dec-2012 Timur Iskhodzhanov <timurrrr@google.com> Hopefully fix the Windows build by not including intrin.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169855 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
321e1254d3bf8d67232aaff133961573fa0e3ec4 11-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] more sceleton code for asan_allocator2

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169836 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_allocator2.cc
956ad47e14ba7a7935dc1ff2d96e02023acf8d4d 11-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix the Windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169828 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
a390ece58317a25ef26866cef6753df4b06a3e65 11-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] make ThreadNamesTest more flexible

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169822 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
c75d8483e27528349620ccf4e997a72029a7ea17 10-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Typo fix in memcpy() and memmove() interceptors: ASAN_WRITE_RANGE and ASAN_READ_RANGE were swapped.
This has been spotted by Anna Zaks (ganna@apple.com)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169736 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
2679f1904dc5d5eb2ce82014116764c5f5131a2b 10-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] move FakeStack into a separate file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169734 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator.cc
san_allocator.h
san_fake_stack.cc
8b0a7ce34660ef5b02d21dddb7d45d502539e9fd 10-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] introduce asan_allocator2.cc, which will have the replacement for asan allocator (now, just a bit of boilerplate)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169733 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator.cc
san_allocator.h
san_allocator2.cc
69d3276170a055a3b8f087d7243314f8d8d07237 08-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: fix interface-symbols test on Mac by explicitly listing all weak functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169660 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/interface_symbols.c
b6dbb59e97474ce4eb76d7a530bd82a58bf92e50 07-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: use new option -fsanitize-blacklist in output tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169646 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/blacklist.cc
it_tests/initialization-blacklist.cc
6a08d29b2020004b801ca69d8aea5872a7e67d72 07-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: change the strategy we use for installing malloc/free/symbolization hooks on Linux: don't provide a default no-op implementations for hooks in runtime, and optionally call hooks if they are provided by the user. Don't force weak interface functions into runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169641 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_report.cc
san_rtl.cc
san_stack.cc
it_tests/interface_symbols.c
67f5c81639ab0ba0d7d9048b7206b424b577c90b 07-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] fix lint, remove debug prints

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169620 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
1877e086eae86c38382c3d3fd2eae03a0d90990a 07-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: intercept prctl on Linux only

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169616 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
716e2f25123bf9b20fbc6b582803a3929b78b96d 07-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] intercept prctl(PR_SET_NAME) and set the thread name. Output the thread names (if non-empty) in asan reports

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169601 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_report.cc
san_thread.h
ests/asan_test.cc
5a15541fc2bbe46a5ce0cd802b5c1055f2ffb14e 05-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] drop the extension from asan tests (as the extension may be different)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169392 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
da60d62281c1ddb08bdf71a0ac7f5a81fceea7a6 05-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] undo the debug printf

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169381 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
72166ca99c2f8898a7a540e60aac3959cbd959bf 05-Dec-2012 Kostya Serebryany <kcc@google.com> [tsan] get rid of *allocator64* files, moving everything to *allocator* files. This will help with the 32-bit allocator implementation and testing

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169368 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
2fbf620369f5f1b7200f7ebfe5938e75cb6fbeb2 04-Dec-2012 Alexander Potapenko <glider@google.com> [ASan] Do not build the interceptors that use ObjC blocks if the compiler does not support blocks.
Need to define MISSING_BLOCKS_SUPPORT in this case at buildtime.

Patch by Jack Howarth <howarth@bromo.med.uc.edu>



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169206 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_mac.cc
ynamic/asan_interceptors_dynamic.cc
d4b5db8cb8a7a13bb5cc1d4ce53e8e088303c854 04-Dec-2012 Alexey Samsonov <samsonov@google.com> ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to these functions are inserted by the instrumentation pass in use-after-scope mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169201 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_poisoning.cc
san_report.cc
san_rtl.cc
it_tests/use-after-scope-inlined.cc
ests/asan_test_utils.h
68aad43bee8b49d41dec72cb4b4eb34cdcd80e9c 03-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] two more bits for __sparc__

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169141 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
e2770623379f403ea8c0247cac9ce8c75167a886 03-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] EXPECT_EQ => ASSERT_EQ around pthread_create/pthread_join calls

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169121 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test_utils.h
2697687059e64a4f1319dc23a0a3ca59982d53f6 03-Dec-2012 Kostya Serebryany <kcc@google.com> [asan] in asan tests, check all return values of pthread_create/pthread_join. Also add the ASAN_AVOID_EXPENSIVE_TESTS macro to guard the test that creates too many threads

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169118 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
ests/asan_test.cc
ests/asan_test_config.h
ests/asan_test_utils.h
badab16503e025326a46a45da8faa6fd20e5fc3d 30-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] make asan_test.cc more gcc-friendly

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168992 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
ests/asan_test_config.h
ests/asan_test_utils.h
4cf06575e772d64907d4dc7d49f2ecc7830137f6 30-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] simplify break_optimization in tests (Jakub Jelinek)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168990 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_break_optimization.cc
ests/asan_test_utils.h
7cc4dc0a9d5d8c310ec72810c2e8090de5a8b5ff 29-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] use brand new -fsanitize= values for init-order/use-after-return ASan output tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168951 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/initialization-bug-any-order.cc
it_tests/initialization-blacklist.cc
it_tests/initialization-bug.cc
it_tests/initialization-nobug.cc
it_tests/stack-use-after-return.cc
b989143d0be56496e8d5fcf75969af35a058792a 29-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] disable BuiltinLongJmpTest on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168872 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
c3a5c173f228cbb15e332e6bbc17c76ebd55d7a8 29-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] enable BuiltinLongJmpTest

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168863 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
d3ca78fdb296d2a51fc224da673ebfff508acf44 28-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] add DISABLED_BuiltinLongJmpTest

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168793 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
bdec26d50b27e082d109acf99f7d713abc51435e 26-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] fix Android build by not calling GetPageSizeCached in a test (no need for the page size anyway)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168585 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
e89f1846d58550f919a0ef9081b11d4b0405019d 24-Nov-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168537 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_mapping.h
san_rtl.cc
ests/asan_noinst_test.cc
f67ec2b6e8d2ae328c27de0b026eea2d6667836e 23-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168517 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_linux.cc
san_malloc_mac.cc
san_rtl.cc
san_stats.cc
san_thread.cc
11e985f7e13fb41f55be82496dbfbf22e769ac4d 23-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] move swapcontext_test to Linux-specific tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168513 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/swapcontext_test.cc
it_tests/swapcontext_test.cc
f3950c6d6acf53fe60735f6d38715c1ea6df814b 23-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] intercept swapcontext on Linux only

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168509 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_linux.cc
san_mac.cc
san_posix.cc
0870028410087e67a0049c76cb7c64f02c260d24 23-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add interceptor for swapcontext to fight with false positives in some of its use cases.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168508 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
san_internal.h
san_posix.cc
san_report.cc
san_win.cc
it_tests/swapcontext_test.cc
5af39e50366f1aacbebc284f572f08ad1ad07357 21-Nov-2012 Kostya Serebryany <kcc@google.com> [asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168424 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_mac.cc
san_mapping.h
san_report.cc
san_rtl.cc
san_thread.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
ests/asan_test_utils.h
10110f6539c5889109e7e2fa32973f1d5de8798c 20-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] pop the two internal functions from the stack trace produced by _Unwind_Backtrace (Peter Bergner)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168369 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
d7d4650dd754aafc874e3b8cd5ab5b38005c84ec 20-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] more support for powerpc, patch by Peter Bergner

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168356 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mapping.h
031633bef8dff03f4e8943a12e34856bd66bbc78 19-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] use raw Exit() to kill the program in case ASan finds an error while reporting the error in the same thread

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168308 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
84f5bacaf1021b9fb6fc2cf48abe5d4d416422ef 19-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] change interface of GetAccumulatedStats() function to prevent Clang from inserting memcpy() call into runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168305 91177308-0d34-0410-b5e6-96231b3b80d8
san_stats.cc
san_thread_registry.cc
san_thread_registry.h
16da7947df767cf75874430d4ecfeeee218339bd 16-Nov-2012 Dmitry Vyukov <dvyukov@google.com> asan: sync with gcc r193553


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168151 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
e406c8c47570659287e619e23479f9fb6640299e 15-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Revert r168040 and r168043 and take a cleaner solution suggested by Kostya: return the known frame name for fake stack instead of looking it up.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168046 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_report.cc
san_thread.cc
c78349f2167766d275ebb7e7113828c469ec7bf0 15-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Minor fix: return to the last byte of the fake stack if we've raced by.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168043 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread.cc
036945d16d94ed6e83a85e243d7fe89687b9baf8 15-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Poison the leftmost shadow byte with a special value so that we can find
the beginning of the fake frame when reporting an use-after-return error.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=126



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168040 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_report.cc
san_thread.cc
4aa1ac9bfd073610d423b57215843903f8384f32 13-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] now we don't need llvm_obj_root to access llvm-symbolizer tool

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167823 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
a22e7e980d407d84801d9d0e9320dafc16b94dd2 12-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] test blacklist functionality for global-init-order checker (r167725)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167727 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Helpers/initialization-blacklist-extra.cc
it_tests/Helpers/initialization-blacklist.txt
it_tests/initialization-blacklist.cc
79ad22ada4e8c47c70bc99c96060c7e452e505fe 12-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Remove llvm-symbolizer from compiler-rt/utils/
This is the first (1/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167722 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
0555259b3dd49d304cb217fd1e8e467adcc7566d 12-Nov-2012 Alexander Potapenko <glider@google.com> [ASan] Fix the golden stack for use-after-free.cc.
The change has been caused by the switch to llvm-symbolizer, that prints inlined stack frames.
This should fix PR 14251


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167721 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/use-after-free.cc
8c7e491c45842a13faedbead8250c8c98817455b 09-Nov-2012 Alexander Potapenko <glider@google.com> Add a possible underscore before the wrappers to the output expectations for Darwin


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167610 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/strncpy-overflow.cc
it_tests/use-after-free.cc
3aa15c1ad60ae6c63973a0982662f26449f661bc 08-Nov-2012 Alexey Samsonov <samsonov@google.com> [ASan] avoid including <new> header in ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167579 91177308-0d34-0410-b5e6-96231b3b80d8
san_new_delete.cc
f10a79a21002a38e6ebc4ed01dec31872f39aed6 06-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update compiler-rt tests to match flag renaming/deprecation in Clang.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167434 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/interface_symbols.c
it_tests/lit.cfg
it_tests/sanity_check_pure_c.c
it_tests/sleep_before_dying.c
it_tests/strip_path_prefix.c
ests/CMakeLists.txt
ea0177e2b8bb5d1dbd22c7e2776f6299fa712799 30-Oct-2012 Alexey Samsonov <samsonov@google.com> Flag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit configs

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167010 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.cfg
f70848decb000cc0e4c05a27eed78865d2f38555 26-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't run hacky test for __asan_get_free_bytes() on 32-bits

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166771 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
71578faf4eb8e61aefb3121e1945cc47f07cea0d 26-Oct-2012 Alexander Potapenko <glider@google.com> In the dynamic runtime on Mac OS, do not call internal_strdup() before __asan_init().
This may result in a crash at startup.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=123.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166768 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ec3a5a21fd261f5227b5ad0d76bc148c6d227297 24-Oct-2012 Alexander Potapenko <glider@google.com> [ASan] Rename ReplaceCFAllocator to MaybeReplaceCFAllocator.
Replace the allocator only if the replace_cfallocator flag is set (in some cases it wasn't checked)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166550 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_mac.h
san_malloc_mac.cc
3e8458ab54c7cbaec45e367b2da909c6f94b291c 24-Oct-2012 Alexander Potapenko <glider@google.com> [ASan] Use internal_memmove() in both static and dynamic runtime libraries if asan_inited != 0.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166549 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
697a22bf050e81a6d94fdc0201a0c46215454e6a 24-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] Due to data races, ASan malloc stats are inaccurate, which may cause certain ASan interface functions returning negative values (casted to unsigned). Return a reasonable value if such a case is detected.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166548 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread_registry.cc
f8168925de9cd0758135d4084ce33e2843aae74f 19-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] add comment to blacklist file to test behavior introduced in r166283

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166284 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.ignore
7a89732b47eba572d5c27bd2ad846d99c87f574c 19-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] instrumented asan unit tests should depend on blacklist file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166282 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
08f6fe2e8565cf332acfe3197ad6bee38da03abb 18-Oct-2012 Evgeniy Stepanov <eugenis@google.com> Stop linking libstlport to ASan runtime.

Change-Id: If2108bce1932f4d6a0f86e47fe19c55cb0bafdfb
ndroid.mk
dbe60352ef7240327f15f813140c9726854f6b85 18-Oct-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Disable new/delete interceptors on Android and make them visible elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166180 91177308-0d34-0410-b5e6-96231b3b80d8
san_new_delete.cc
49441816aa9a4c7bb27a41c880e56f01d9fd85d6 18-Oct-2012 Chandler Carruth <chandlerc@gmail.com> Re-enable this test now that r166172 has hacked around the terrible
limitations of the pass manager stack in the pass manager builder.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166173 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/force_inline_opt0.cc
de55be3899b994731ba2d9e168281d608dab3048 17-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] unit tests: Move main() to a separate file. Fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166104 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_noinst_test.cc
ests/asan_test.cc
ests/asan_test_main.cc
8d8626fc3dc12c6d1f5b4cf2d3968447b7eea265 17-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] added a test for a bug in asan at -O0 introduced by r165936 (making asan a FunctionPass). The test is not actually enabled for -O0 yet (since it fails)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166103 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/force_inline_opt0.cc
fa7e95da75c30b7111224e68cb4405357bdc0f4b 17-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] Fix strchr/index tests for users who have 'char* strchr(char*,int)' instead of 'char* strchr(const char*, int)'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166101 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
ests/asan_test_utils.h
1cffef3e39cad4eb33606afbebac78d6637361ac 17-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't use attribute no_address_safety_analysis if it's unknown to compiler

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166099 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
ests/asan_test_utils.h
68e8acab81a43ccf849add9272a761dc6b73ee8d 17-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] fix gcc warnings while building asan-rt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166093 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
e0c94cc6b2f84d3895ad7214cb8a830a9b9ff0c0 16-Oct-2012 Alexander Potapenko <glider@google.com> Do not call ReplaceCFAllocator() before __CFInitialize(), otherwise crashes are possible on 10.8.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=122


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166029 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
4e0e50a2a208305d7635caf1a7a7c51a4a7e1cb9 16-Oct-2012 Alexander Potapenko <glider@google.com> Commit a leftover file from r166026: Add MACOS_VERSION_MOUNTAIN_LION.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166028 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.h
679bf63dba568611bf1fe6397fd0c41d43ac041a 16-Oct-2012 Alexander Potapenko <glider@google.com> Add MACOS_VERSION_MOUNTAIN_LION.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166026 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
f1673e61768cb08d488a75584b61bfdf24ffdac1 15-Oct-2012 Alexander Potapenko <glider@google.com> Implement internal_memmove.
Use internal_memmove() and internal_memcpy() in the memcpy() and memmove() wrappers
when building the dynamic runtime (OS X only), to work around a bug in resolver functions wrapping.
See also http://code.google.com/p/address-sanitizer/issues/detail?id=116



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165939 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ca9b5dd9922fb7f6e0ca06dbba7db7398b8997f1 15-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] fix more tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165934 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
69d8ede30a0ef32c74af7e4e795eb4b4e7fb1d36 15-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] change the asan output slightly to avoid user confusion: a) add ':' after 'AddressSanitizer' and b) changed 'crashed' to 'SEGV'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165932 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
it_tests/Linux/initialization-bug-any-order.cc
it_tests/deep_stack_uaf.cc
it_tests/deep_tail_call.cc
it_tests/deep_thread_stack.cc
it_tests/initialization-bug.cc
it_tests/large_func_test.cc
it_tests/memcmp_test.cc
it_tests/null_deref.cc
it_tests/shared-lib-test.cc
it_tests/use-after-free.cc
35b661425ad452520544863f1b1afae961e6a92e 09-Oct-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165493 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
444a185d855bccf806f12572d3e8a01eee7c09bf 08-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] use llvm-symbolizer for ASan lit-style tests on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165391 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/CMakeLists.txt
it_tests/global-overflow.cc
it_tests/heap-overflow.cc
it_tests/large_func_test.cc
it_tests/lit.cfg
it_tests/null_deref.cc
it_tests/shared-lib-test.cc
it_tests/stack-overflow.cc
it_tests/strncpy-overflow.cc
it_tests/use-after-free.cc
cripts/asan_symbolize.py
50f2e30497ba2a69ee5721e7235a296d7c13a495 05-Oct-2012 Alexander Potapenko <glider@google.com> If !asan_inited, call internal versions of libc functions where available.
This is to remove unnecessary #if directives.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165307 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
e933c9fc831073560e8731ac5a5e8414549387b5 04-Oct-2012 Alexander Potapenko <glider@google.com> Avoid calling __asan_init from memcpy(), memmove(), memset() during libSystem initialization.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=117.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165227 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
e8216fd93f6f8980965197a1779b6f54441255ca 04-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] properly report mmap failure

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165214 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/rlimit_mmap_test.cc
3be338483aee033699cabfe47efe3e7c0b4c7a2b 03-Oct-2012 Alexander Potapenko <glider@google.com> Set ASAN_NEEDS_SEGV=0 on Android only.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165120 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
8bf8b7943848973398be0c3ad99855e20da6d6fa 02-Oct-2012 Alexander Potapenko <glider@google.com> Do not patch the instruction address when symbolizing the reports.
Instead, print the correct address at runtime.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165018 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
866334332ff8c2a1b7f3715224614b6b75a7578c 02-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] Change __asan_set_on_error_callback to weak overridable __asan_on_error, so that ASan would call the latter even if it finds the error early (i.e. during module initialization)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165008 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_rtl.cc
it_tests/on_error_callback.cc
ests/asan_noinst_test.cc
0ec37a6e84b37ef4785b9863e98d0339c5a10190 02-Oct-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add extern C for __asan_symbolize on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165003 91177308-0d34-0410-b5e6-96231b3b80d8
san_win.cc
1ca535700966cf5019dcc6684a62a734a7b96974 02-Oct-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165000 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_rtl.cc
san_stack.cc
san_win.cc
it_tests/symbolize_callback.cc
7da8503a90c7f84787aa1ba978e2223893fa7727 28-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Fix unit test headers. Add an option to change substitute asan_test_config.h file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164821 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_benchmarks_test.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
ests/asan_test_config.h
ests/asan_test_utils.h
855114a3d5e5a08c0e38ba8c9e4ec5313d8cbadb 28-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164819 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/CMakeLists.txt
it_tests/lit.cfg
it_tests/lit.site.cfg.in
9712af9ce7f5efc14cb11af2599fd065e7b7a3dd 28-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Change defaults for Android target.

This way building without -DASAN_* in CFLAGS produces working binaries.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164816 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
ce31aa700275ab17aa42db0d1d175abddc89eb2e 26-Sep-2012 Alexander Potapenko <glider@google.com> Fixed a number of gpylint warnings, added binary names filtering (useful for Chrome), minor fixes.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164695 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
b2546c44c828a546a98c091c714b71b1c9966673 26-Sep-2012 Alexander Potapenko <glider@google.com> Encapsulate the main loop into a class to allow reusing it.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164694 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
6da31e480c0cbaa7e2002c6d97b316e19874205a 26-Sep-2012 Alexander Potapenko <glider@google.com> Set --use-symbol-table=true as Alexey has already resolved the FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164693 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
b46941a1d23012491a7a8a52718cacbde3c19ba1 24-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Apply some ASan-relevant pieces of patch by Ruben Van Boxem. In the same time, remove ASan from CMake build on Windows after conversation with Timur. We don't want to support building ASan on Windows until it is in a working state.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164486 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_win.cc
75317318a7173801a00494717b9408142fbcee5c 19-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] make asan_symbolize script work if there is no llvm-symbolizer available

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164214 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
63e4df4356c9949d95ad0bb6b8fd5f56de2efd00 19-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix offline python symbolizer script to use llvm-symbolizer if possible

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164209 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
b0ddf227b25388ad836e560c00f0aec84026b0e5 19-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] cleanup: fix headers and lint warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164205 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_globals_test.cc
ests/asan_test.cc
58b017bb286a8f4413a9348d2c87c52de38cff6d 18-Sep-2012 Alexander Potapenko <glider@google.com> Intercept signal() and sigaction() within the dynamic runtime on Mac.
Add a test that ensures that ASan does not allow to override the signal handlers.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164118 91177308-0d34-0410-b5e6-96231b3b80d8
ynamic/asan_interceptors_dynamic.cc
ests/asan_test.cc
5c153faa535f671dd0e8d40ab43397f2d3c6f6f5 18-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Move printing descriptions of heap addresses in error report from allocator internals to asan_report.cc.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164112 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_report.cc
62e27098b97e5ef74931c536350123a3df9dec6d 17-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] increase sleep time if ASan finds two bugs simultaneously to make sure full error report is printed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@164018 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
78103db90782ca30593d7b1066b77792ca2f3459 14-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Remove some debugging code.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163881 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
81dfbb76f858fbc4084771fce4967ede04ed5f44 14-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] add asan option log_path=PATH to let users redirect asan reports to a file PATH.PID instead of stderr

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163872 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
it_tests/log-path_test.cc
ca2cdd989076d091d8c4d4c277f8b47d9b5903ad 12-Sep-2012 Alexander Potapenko <glider@google.com> Give more accurate malloc statistics to malloc_zone_statistics().

Fix a warning in macros instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163716 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
san_stats.h
san_thread_registry.cc
san_thread_registry.h
ests/asan_test.cc
4ea14c2fa243684e1d7a017bd4f0d1e38801de0a 12-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] more macro/casting magic to suppress warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163706 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_malloc_mac.cc
76e842845c927e92c2c21c41ac51e364fa17528c 12-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix compiler warnings for unit test on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163704 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_test.cc
c27279a4a08e0661f204c3e5dc65aafce79dec8a 12-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix interception macro for Android build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163692 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_linux.cc
938c1ba136eb04ded2c982219edd689502094a54 12-Sep-2012 Alexander Potapenko <glider@google.com> Initial support for malloc_zone_statistics. All counters are set to zero now.
This is required to overcome a crash in mstats() (http://code.google.com/p/address-sanitizer/issues/detail?id=109)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163690 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
b43d6a8ca10b9af8a903e8726003ae7767f9e823 12-Sep-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] first effort to start building ASan runtime with -Werror in CMake build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163686 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ests/CMakeLists.txt
ests/asan_noinst_test.cc
34fc56c43f60be0b85a0e3ce30658fd98951f0b8 11-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> CMake build rules for ASan Android runtime and tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163613 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
70a7095e37289746fd20595457d517faf66dc6a4 11-Sep-2012 Alexey Samsonov <samsonov@google.com> [compiler-rt] Install support for CMake build of compiler-rt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163607 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
591616d323d73b7ea7cd8fea4eec46cedccda27e 11-Sep-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Get rid of dependency between sanitizer_common and asan/tsan runtimes: implement tool-specific Die and CheckFailed functions via callbacks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163603 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
1f922a5259510f70a12576e7a61eaa0033a02b16 11-Sep-2012 Stephen Hines <srhines@google.com> Merge up through LLVM r163557.

Updated Android.mk source file for asan and fixed up test setup (thanks to
Evgeniy for the starter patch).

Change-Id: I4dcf13130505f4c1e2eed191a3b403ccab5e5e26
ndroid.mk
san_android_stub.cc
56937189e87949cca1964a399c8db3fd2ef0fa2d 11-Sep-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge-2012_09_10

Conflicts:
lib/sanitizer_common/sanitizer_allocator.cc

Change-Id: Ic93702aa92d9d4d582b25b33dfc14f6176d6b8a8
cb9bd24e5f226b9a922098403cbd1589be39e605 11-Sep-2012 Chandler Carruth <chandlerc@gmail.com> Revert r163411 based on review discussion.

In code review, it looked like these warnings do not actually fire with
modern Clang or GCC. However, the pragma is flat out rejected by GCC in
many configurations (-Werror) so it ended up causing more problems than
it fixed.

Daniel agreed with reverting this, but I think didn't have time to get
to it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163583 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
8d6e3f7d011970e35dadf831964260bcf6a4d8a9 10-Sep-2012 Alexander Potapenko <glider@google.com> Allow to call strchr() from __asan_init().
Fixes PR13794.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163493 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
0d02f1f1a076bd5931309f2cfc0422b477a4e7a2 07-Sep-2012 Daniel Dunbar <daniel@zuster.org> [asan] Use a relative include path instead of requiring build system involvement.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163414 91177308-0d34-0410-b5e6-96231b3b80d8
ynamic/asan_interceptors_dynamic.cc
38b7c1bd5dcbd669759a31b6c9fb6e8683432896 07-Sep-2012 Daniel Dunbar <daniel@zuster.org> build: Teach Makefile build system about asan/dynamic subdir.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163413 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.mk
ynamic/Makefile.mk
f4e21fb6369497a271373ef4530e33a40e607542 07-Sep-2012 Daniel Dunbar <daniel@zuster.org> [asan] Suppress some bogus -Winvalid-noreturn diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163411 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
8e23d275ec871c16b71f3a98cc475f0db8cb3863 07-Sep-2012 Alexander Potapenko <glider@google.com> Remove the infinite recursion check for now, as we don't have __thread on Mac, and TSD is an overkill.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163393 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
5aabcb547a983653a754258d63e27e3790c564d3 07-Sep-2012 Alexander Potapenko <glider@google.com> Two minor changes:
-- exit from infinite recursion in CHECK()
-- print a verbose message if mapping of the shadow memory has failed.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163391 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
7315c26122cbdfee82f4dbadaedd5c1b85755503 07-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Raise quarantine size a bit with ASAN_LOW_MEMORY.

Our tests expect that a 16M block will fit in the quarantine.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163384 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
d79635960420cc24f2533a12ee221f51d8a98a81 07-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] hack initialization-bug test so that it stably passes on both Linux and Mac: make the bug appear independent of the translation unit order

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163381 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Helpers/initialization-bug-extra2.cc
it_tests/initialization-bug.cc
ef698124b4d1875bb793a4f1d885a3d2f1f538e1 07-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] add Linux-specific test for initialization order that checks that we find a bug independently of translation units order

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163379 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/initialization-bug-any-order.cc
78c7f57e2dd5240b0c2c8bfefd8a776c517f1e22 06-Sep-2012 Alexander Potapenko <glider@google.com> Fix two compiler warnings: must use at least one argument for "..." in a variadic macros, signed vs. unsigned comparison.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163314 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_rtl.cc
e0e9eea99d7a81a15c4bb15ff2e5ebd92b50817b 06-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [asan] Use __ANDROID__ guard in asan_test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163313 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
e9f5785228eb19e64719a1a3e258d12639479c8c 06-Sep-2012 Alexander Potapenko <glider@google.com> Use the return value of dladdr() to avoid Clang warning.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163311 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
6d924facc5c979a0d25f484cffcdb51c766ed551 06-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] increase max stack size to 256 (+test)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163308 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
san_thread.cc
it_tests/deep_stack_uaf.cc
ba534e7fc561c4a61acbb1bbc03e0a02996c8e94 06-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] actually remove old makefile

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163300 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.disabled
5b1f0202cefdab3970b4d5372777d586ffa49dd3 06-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Nuke output_tests/ in favor of lit_tests/. Stop using Makefile.old.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163294 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.disabled
akefile.old
EADME.txt
utput_tests/clone_test.cc
utput_tests/deep_tail_call.cc
utput_tests/default_options.cc
utput_tests/dlclose-test-so.cc
utput_tests/dlclose-test.cc
utput_tests/global-overflow.cc
utput_tests/heap-overflow.cc
utput_tests/interception_failure_test-linux.cc
utput_tests/interception_malloc_test-linux.cc
utput_tests/interception_test-linux.cc
utput_tests/large_func_test.cc
utput_tests/memcmp_test.cc
utput_tests/null_deref.cc
utput_tests/shared-lib-test-so.cc
utput_tests/shared-lib-test.cc
utput_tests/stack-overflow.cc
utput_tests/stack-use-after-return.cc.disabled
utput_tests/strncpy-overflow.cc
utput_tests/test_output.sh
utput_tests/use-after-free.c
utput_tests/use-after-free.cc
ff392a44a9af183de5adc8893ddd11ac77625d56 06-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] increase the maximal size of malloc/free stack

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163291 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
4a78b1e4685f34aa8a53287c51e4215880e554e0 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Hack ASan lit config to allow running lit on tests manually

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163209 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
it_tests/CMakeLists.txt
it_tests/lit.cfg
5f799c78e5b1bd8105bab77a0935f27ee808dc97 05-Sep-2012 Kostya Serebryany <kcc@google.com> [asan] added tests for asan-initialization-order, patch by Reid Watson

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163207 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Helpers/blacklist-extra.cc
it_tests/Helpers/initialization-bug-extra.cc
it_tests/Helpers/initialization-nobug-extra.cc
it_tests/Helpers/lit.local.cfg
it_tests/blacklist.cc
it_tests/initialization-bug.cc
it_tests/initialization-nobug.cc
0f7d4a4ad69ad20053d8b78c611853e778bd465a 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] hoist more compile flags to SANITIZER_COMMON_CFLAGS var and add the rest of flags/defs from old Makefile to CMake

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163204 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
656e4eef01b935e7d356e697e0f3ef4c99be2fbf 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add CMake support for building ASan benchmarks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163201 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
71b42c9740e6f73da607aaa539affb5c4807231c 05-Sep-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add print_full_thread_history runtime option (on by default) that prints all full thread creation paths for threads involved in ASan error report

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163200 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_flags.h
san_report.cc
san_report.h
san_rtl.cc
san_thread.h
it_tests/deep_thread_stack.cc
184fdd7837ca5b4f2c8cfd2ba1fb1e32f3a5ffbe 31-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Remove lint checkers from our old makefiles in favor of buildbot

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162981 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
EADME.txt
5092682c3a6902e460a6e439cf48b3dc7d48dc65 30-Aug-2012 Alexey Samsonov <samsonov@google.com> Whitespace/lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162909 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_thread.h
ests/asan_test_utils.h
62825675e6b4f3d8459f745fe68ae30f236f82a5 29-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix flakiness of Linux-specific clone_test: waitpid should better be provided with __WCLONE option, otherwise it didn't wait for the subprocess, returned -1, and we went crushing the subprocess stack

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162842 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/clone_test.cc
2122f705fcad0316b5ff9d5e1e9260fd18191e1f 29-Aug-2012 Alexander Potapenko <glider@google.com> For invalid pointers passed to free_common check whether they are actually skewed to hold an additional CFAllocatorRef.
If so, fix the pointer and pass it to asan_free.

See http://code.google.com/p/address-sanitizer/issues/detail?id=70 for more background.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162839 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
a60844da5bbaaa60e546f3e2bd14a1763965ef65 29-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] fix asan's Makefile.old -- our build bot still uses it (hopefully, will soon migrate to cmake completely)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162831 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
d865fecddccebf898ceed24d096fc58fb29a6e57 29-Aug-2012 Chandler Carruth <chandlerc@gmail.com> Relocate the external headers provided by ASan and the common sanitizer
library.

These headers are intended to be available to user code when built with
AddressSanitizer (or one of the other sanitizer's in the future) to
interface with the runtime library. As such, they form stable external
C interfaces, and the headers shouldn't be located within the
implementation.

I've pulled them out into what seem like fairly obvious locations and
names, but I'm wide open to further bikeshedding of these names and
locations.

I've updated the code and the build system to cope with the new
locations, both CMake and Makefile. Please let me know if this breaks
anyone's build.

The eventual goal is to install these headers along side the Clang
builtin headers when we build the ASan runtime and install it. My
current thinking is to locate them at:

<prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h
<prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h
<prefix>/lib/clang/X.Y/include/sanitizer/...

But maybe others have different suggestions?

Fixing the style of the #include between these headers at least unblocks
experimentation with installing them as they now should work when
installed in these locations.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162822 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_flags.h
san_globals.cc
san_interceptors.cc
san_interface.h
san_poisoning.cc
san_report.h
san_rtl.cc
san_stack.cc
san_stats.cc
it_tests/interface_symbols.c
utput_tests/test_output.sh
ests/asan_noinst_test.cc
60ab090deed8213613643729a7921ef0915ac704 29-Aug-2012 Chandler Carruth <chandlerc@gmail.com> Some flag cleanup for the sanitizer runtimes.

This hoists most of the CFLAGS into a common variable. It also adds
detection for -Wno-c99-extensions and uses it to silence a pile of
warnings.

Finally, it switches to the proper flag -rdynamic.

With this, the cmake build is warning free on my bootstrap Linux build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162809 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
80acccf4647c3482c3e3e6ae21e757ba580a5956 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] one more fix for windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162762 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
69f2174b3bdee7fe6c6911778147fc7e35d57693 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] fix Windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162758 91177308-0d34-0410-b5e6-96231b3b80d8
san_win.cc
1b5ea8fbbef73f5d9b41dbb26a21b9a0f4d1445e 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] actually move StackTrace to sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162757 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_stack.cc
san_stack.h
cc347222d55967fdb775429a8a0a3a5d795b8b50 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] even more refactoring to move StackTrace to sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162754 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_report.cc
san_stack.cc
san_stack.h
san_thread.h
2b939c3abc8b7713ef28000bd768ca6d77445f45 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] more refactoring to move StackTrace to sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162752 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mac.cc
san_stack.cc
san_stack.h
8757a68c78f76fca32d3f2256fa70a7b550aa9e1 28-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] CMake build: share more compile flags between instrumented and non-instrumented tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162750 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
c3390df6670cb166119b961eb27a033fb9073496 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] some renaming before we move StackTrace into sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162747 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_internal.h
san_linux.cc
san_mac.cc
san_report.cc
san_report.h
san_stack.cc
san_stack.h
san_thread.cc
san_thread.h
san_win.cc
ests/asan_noinst_test.cc
283c296b64bc55deec9698260b3427a9b050a925 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of AsanPrintf in favor of Printf from sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162746 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator.cc
san_internal.h
san_malloc_mac.cc
san_printf.cc
san_report.cc
san_rtl.cc
san_stack.cc
san_stats.cc
san_thread.h
2c29212c42d457ade0bbd1d01de92195dd9ce925 28-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] improve SetErrorReportCallbackTest to actually catch missing functionality in __asan_set_error_report_callback

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162745 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
ests/asan_noinst_test.cc
b10027729a3b809469f6b6ad40407ca453d6f54a 27-Aug-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> CMake build rules for ASan/Android runtime.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162675 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
947fbd1a073fcd38988c1ec131452e99bb0313f8 27-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use low-level allocator in flag parsing to avoid calling malloc() before ASan/TSan initialization is done

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162673 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_rtl.cc
san_thread.cc
e1f5dac9296df08ff83ae5fca51ce4da995b55cf 27-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Rename ProcessMaps to MemoryMappingLayout and fix Windows build by providing stub implementation

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162671 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
1069b9a6845a95e3482f9ee68d8e5b3e970fa11c 27-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] add missing build dependency on sanitizer_common headers

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162670 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.mk
3891ce634380845d337cd865e559f4abbdc8ebdb 27-Aug-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> A few tweaks for building ASanRT against Android NDK.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162666 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_malloc_linux.cc
san_mapping.h
san_new_delete.cc
san_thread_registry.cc
70e177e29c6f9ac987b65a79f6b4f3ebdabc75cc 27-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move low-level (mmap-based) allocator to sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162663 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_rtl.cc
san_thread_registry.cc
f5b925fde9c855eab4fbc71354e79cc777ed19ec 24-Aug-2012 Alexander Potapenko <glider@google.com> Revert the erroneous changes made to Makefile.old in r162547
Remove a spare newline from asan_rtl.cc


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162548 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
san_rtl.cc
eb8c46e419f4c6f01d1b1a0d1b96cc51a61ecbc3 24-Aug-2012 Alexander Potapenko <glider@google.com> If the program is linked to a dynamic ASan runtime which is not present in DYLD_INSERT_LIBRARIES
(which, in turn, is required for our interceptors to take effect), re-exec the program with
DYLD_INSERT_LIBRARIES set.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162547 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
san_flags.h
san_interceptors.h
san_internal.h
san_linux.cc
san_mac.cc
san_rtl.cc
san_win.cc
1e2525d0ec9ac64e583b57316ea30cecce591fb1 24-Aug-2012 Alexander Potapenko <glider@google.com> Add add_clang_runtime_shared_library() CMake function and use it to put the shared ASan runtime in the appropriate place.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162546 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6490f0d0b9a761083016aa469c9cce72b341b0a4 23-Aug-2012 Stephen Hines <srhines@google.com> Fix up compiler-rt for upstream merge to r162279.

Some new files to compile + fixing an unimplemented function that now
returns a value.

Change-Id: I088a9830a9a1e0702442a5ca78716465c300e7af
ndroid.mk
58948471cbd30eca1336a27687093f08b7f44bdd 24-Aug-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge_2
af198e421ea198c5f9fa8cd691aa9a209b3d96a0 23-Aug-2012 Alexander Potapenko <glider@google.com> Re-implement the wrappers for libdispatch functions using blocks where appropriate
(kudos to Anna Zaks for a good example).
This simplifies the code much and lets us not implement internal parts of libdispatch.

All ASan tests from t32 and t64 should pass with the dylib runtime now.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162439 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_mac.cc
ynamic/asan_interceptors_dynamic.cc
9c6e5303fa025a73a09cee0766ae403909b1bb8b 23-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Switch the symbolization strategy that would be used by sanitizer tools family: as compiling in-process symbolizer into runtime involves certain difficulties, we may instead launch an external symbolizer program (fork + execl) in a subprocess and communicate with it via pipe.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162437 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
06a7153ecdd8414a7e2116eb5841c89f1855a267 22-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] use write instead of puts in malloc hooks test for ASan, as puts calls malloc on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162359 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/malloc_hook.cc
c93d3e2bdfb1ad9cce26a6e8d66764ed97a6d6b4 22-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] get rid of ASAN_USE_EXTERNAL_SYMBOLIZER compiler def in favor of __asan_set_symbolize_callback interface function. Now the user doesn't have to recompile ASan runtime to provide its own symbolizer

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162358 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface.h
san_internal.h
san_rtl.cc
san_stack.cc
san_win.cc
it_tests/interface_symbols.c
it_tests/symbolize_callback.cc
utput_tests/test_output.sh
b21de9e71522a7f9ed31fd92aafe6936873a971c 22-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] make ASan malloc/free hooks weak interface functions, overridable by user. Now the user can control malloc/free hooks without recompiling ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162355 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_interface.h
san_rtl.cc
it_tests/malloc_hook.cc
128892cb26ee50b0fa2171198c7a919540dcd4e7 21-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] fix mac build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162279 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
3945c58f9db42671b1a3b865fde5008f09a3a40e 21-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] run-time part of the initialization order checker. Patch by Reid Watson with some bits from kcc. The sub-pass is off by default for now. On simple tests it works fine.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162278 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_globals.cc
san_interface.h
san_internal.h
san_report.cc
san_rtl.cc
2bf265b3faf8be1710e9a0441fe9344e105e991c 21-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] update asan-rt to match the interface change in LLVm (r162268)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162269 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface.h
0ffc227f91b068c78908f735a4846f92e339a337 21-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] fix lint

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162258 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
2483ce3e635515d907c0cd8c97db315142fb28db 20-Aug-2012 Alexander Potapenko <glider@google.com> Dynamic interceptors for dispatch_async and dispatch_after.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162202 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_mac.cc
ynamic/asan_interceptors_dynamic.cc
b09dd34786713a150fed5c5ab1529f01de0e2bc0 20-Aug-2012 Alexander Potapenko <glider@google.com> Minor refactoring: reduce code duplication by introducing a macro for dispatch_sync_f, dispatch_async_f, dispatch_barrier_async_f bodies.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162199 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
5ffb40c5532932d4a20738222a43286cf153de52 20-Aug-2012 Alexander Potapenko <glider@google.com> Fix a leftover #if defined(DYNAMIC_MAC_WRAPPERS).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162197 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
9ee7cf199bbeb71788088d880d453b8ac9d2fca0 17-Aug-2012 Alexander Potapenko <glider@google.com> Intercept siglongjmp and _longjmp under "#if ASAN_INTERCEPT_*"


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162103 91177308-0d34-0410-b5e6-96231b3b80d8
ynamic/asan_interceptors_dynamic.cc
beda44f87166f91dbeef3d174d77395653bead4d 17-Aug-2012 Alexander Potapenko <glider@google.com> Fix lint warnings.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162092 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
0ef531054fc25c11e372cbab1384f10954984219 17-Aug-2012 Alexander Potapenko <glider@google.com> Commit the source and CMake changes that will allow to build ASan runtime
as a shared library on Mac OS. This will provide an alternative to
mach_override.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162091 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_interceptors.cc
san_malloc_mac.cc
ynamic/asan_interceptors_dynamic.cc
23ff97daaa73e858aa2d35618276886c2a8f1e95 15-Aug-2012 Alexander Potapenko <glider@google.com> Remove the extra semicolon reported by the buildbot.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161954 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
05bf9a51dfeac0f84f6dbc2dacf987249c0fc612 15-Aug-2012 Alexander Potapenko <glider@google.com> Introduce asan_intercepted_functions.h which contains the declarations wrapped functions and their wrappers.
Those declarations are going to be shared between asan_interceptors.cc and the dynamic runtime library on Mac OS.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161952 91177308-0d34-0410-b5e6-96231b3b80d8
san_intercepted_functions.h
san_interceptors.cc
9029bdaa43ba59bbc0e73ccb9fa4a0f578bc283d 15-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] lit tests: use nm instead of llvm-nm, until llvm-nm becomes usable on Mac. Port output test change in r161948 to lit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161951 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/CMakeLists.txt
it_tests/interface_symbols.c
it_tests/sanity_check_pure_c.c
d14db182365578e79f5f60c5cf1052d5f9a0edef 15-Aug-2012 Alexander Potapenko <glider@google.com> Check for filenames and numbers to detect possible problems with asan_symbolize.py on -fPIE binaries.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161948 91177308-0d34-0410-b5e6-96231b3b80d8
utput_tests/use-after-free.c
5cfa30e23c092df3265b1ff9e205f36874a2e194 15-Aug-2012 Alexander Potapenko <glider@google.com> Pass offset of the frame address within the binary to addr2line instead of the absolute address.
Fixes the problem with -PIE binaries.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161947 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
71d47fff39a675607933e84071b2e342cc989a0a 15-Aug-2012 Alexander Potapenko <glider@google.com> Patch the frame address regardless of the frame number.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161946 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
37c4853762c6123a5fef0042d8f65193791b355c 15-Aug-2012 Alexander Potapenko <glider@google.com> Move the prototype of __CFInitialize to asan_mac.h so that asan_malloc_mac.cc may use it in the dynamic library mode.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161945 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_mac.h
ec3b0732a62bd0a52da7bbfc4e227038ccf9372c 15-Aug-2012 Alexander Potapenko <glider@google.com> Use SANITIZER_INTERFACE_ATTRIBUTE instead of __attribute__((visibility("default")))
Export CheckFailed, asan_malloc, asan_free, asan_memalign, AsanStackTrace::CompressStack, AsanStackTrace::UncompressStack from the dynamic runtime library.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161943 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_rtl.cc
san_stack.cc
11f2b17a5cae796c047a7e22bea4452da337bbce 15-Aug-2012 Alexander Potapenko <glider@google.com> Make __asan::asan_{malloc,free,memalign} globally visible, so that the dynamic version of the runtime will export them.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161942 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
a10d1dccd93a4aed127719e75a457987a2e8932c 15-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Port (the last one) tricky interface_test to lit, and a *huge* chunks of boilerplate to run tests for 32/64 bits and all optimization levels. Alas, lit doesn't support for loops in RUN-lines...

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161941 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/clone_test.cc
it_tests/Linux/interception_failure_test.cc
it_tests/Linux/interception_malloc_test.cc
it_tests/Linux/interception_test.cc
it_tests/deep_tail_call.cc
it_tests/dlclose-test.cc
it_tests/global-overflow.cc
it_tests/heap-overflow.cc
it_tests/interface_symbols.c
it_tests/large_func_test.cc
it_tests/lit.cfg
it_tests/memcmp_test.cc
it_tests/null_deref.cc
it_tests/shared-lib-test.cc
it_tests/stack-overflow.cc
it_tests/stack-use-after-return.cc
it_tests/strncpy-overflow.cc
it_tests/use-after-free.cc
f0c6de3d91ba5cdfbb17a630e823523c7d433160 15-Aug-2012 Alexander Potapenko <glider@google.com> Do not attempt to intercept mlock and friends on Windows.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161939 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
00f1c091441be5c2cacb99e21bd1965a5e418242 15-Aug-2012 Alexander Potapenko <glider@google.com> Use the common interception machinery for mlock/munlock/mlockall/munlockall.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161938 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
589231cf31932e3a132b8fe37b0425d46abe6d32 15-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] use clangxx_asan instead of clang_asan for C++ lit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161936 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/clone_test.cc
it_tests/Linux/interception_failure_test.cc
it_tests/Linux/interception_malloc_test.cc
it_tests/Linux/interception_test.cc
it_tests/deep_tail_call.cc
it_tests/default_options.cc
it_tests/dlclose-test.cc
it_tests/global-overflow.cc
it_tests/heap-overflow.cc
it_tests/large_func_test.cc
it_tests/lit.cfg
it_tests/memcmp_test.cc
it_tests/null_deref.cc
it_tests/shared-lib-test.cc
it_tests/stack-overflow.cc
it_tests/stack-use-after-return.cc
it_tests/strncpy-overflow.cc
it_tests/use-after-free.cc
41f85b9e6a88f801955d99c8a8233b97e64c51ff 15-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] port remaining output and feature tests to lit. TODO: we should in fact run most of the tests for 32/64 bits and for all optimization levels

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161935 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/global-overflow.cc
it_tests/heap-overflow.cc
it_tests/large_func_test.cc
it_tests/lit.cfg
it_tests/memcmp_test.cc
it_tests/null_deref.cc
it_tests/sanity_check_pure_c.c
it_tests/sleep_before_dying.c
it_tests/stack-overflow.cc
it_tests/stack-use-after-return.cc
it_tests/strip_path_prefix.c
it_tests/strncpy-overflow.cc
it_tests/use-after-free.cc
2ad9b21f865d305057deadb839d673cc499b439e 15-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] port interception and shared library tests to lit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161933 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/interception_failure_test.cc
it_tests/Linux/interception_malloc_test.cc
it_tests/Linux/interception_test.cc
it_tests/SharedLibs/dlclose-test-so.cc
it_tests/SharedLibs/lit.local.cfg
it_tests/SharedLibs/shared-lib-test-so.cc
it_tests/dlclose-test.cc
it_tests/shared-lib-test.cc
c58b57eac9cc1a495f3c8ffa5fe4a5cf55e96a6a 15-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] move declaration of __asan_default_options to interface header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161932 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_interface.h
utput_tests/test_output.sh
0aa04b3f432bc55e7c116d5280685ee3f243be8e 14-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] better diagnostics for mmap failure

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161874 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
08d978809ac98095815e5cab80caeb0089f89a1e 14-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] make sure __asan_default_options symbol is exported

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161873 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
c6b8716d9acd202d311a7d9095eeed440bba1ce5 14-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] make sure __asan_default_options gets default visibility, port corresponding test to lit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161869 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
it_tests/default_options.cc
25fa5e1f50d74a2499d73657535dc043d2f5607b 14-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] support for running OS-specific tests using lit, port clone_test as an example

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161864 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/Linux/clone_test.cc
it_tests/Linux/lit.local.cfg
it_tests/lit.site.cfg.in
e2430d22c5f9055622a98dc9f885fc73b64cba23 13-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] add __asan_set_on_error_callback into force_interface_symbols (thanks to cool test by glider@)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161756 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
f657a1977b6053c76ca8393f574da7593ea3ea12 13-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add __asan_set_on_error_callback() interface function that allows user to set a callback to be called right when ASan detects an error

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161754 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface.h
san_report.cc
ests/asan_noinst_test.cc
be98caf9fe5e7b94b2009616cf31f0d87cf98d67 13-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] If ASan finds second error report, wait for some time and die (instead of running in a busy loop) to make sure ASan won't hang if it finds error while reporting an error in the same thread

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161749 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
9873792adb79e9daa1594564cbe5b2d680c5ed13 10-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] share code executed at the beginning/end of printing error reports

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161666 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_report.h
utput_tests/null_deref.cc
fe51abb4949ad9976168bf53edb52c20016b9a0d 10-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] CMake support for building ASan runtime as a universal binary on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161665 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
it_tests/CMakeLists.txt
ests/CMakeLists.txt
79fc3c042bbe8348fb6f3bff7a5575e4425e5a38 10-Aug-2012 Alexander Potapenko <glider@google.com> Remove the setjmp.h dependency, fix the comment.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161662 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
d262653fa207c6ee89700f192c5ff809a8ed6f52 10-Aug-2012 Alexander Potapenko <glider@google.com> Temporary fix for http://code.google.com/p/address-sanitizer/issues/detail?id=99:
when trying to free memory that actually belongs to the system purgeable zone, use malloc_zone_free(malloc_default_purgeable_zone(), ptr) instead of asan_free().


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161661 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
5a9938d4de74d41cb5f167f751a621dfb7545b64 09-Aug-2012 Alexander Potapenko <glider@google.com> Add a test checking that all the "__asan_" interface functions are present in a binary built with -dead_strip.
Fix force_interface_symbols() so that none of the interface symbols is stripped.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161582 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
utput_tests/test_output.sh
663c50134e01feefb6c5418c6ec7753be951c14f 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Move mac-specific error reports to asan_report.cc as well

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161576 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
san_report.cc
san_report.h
812ff90eaad0e4555554ffb81db0e611ec434e10 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Small fix to please tests on Windows, where stack unwinding using provided pc/bp works too bad

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161575 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_report.h
c98570beff64ec0a513dcc11a4662ffba70e43dd 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Move __asan_report_error implementation to asan_report.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161574 91177308-0d34-0410-b5e6-96231b3b80d8
san_report.cc
san_report.h
san_rtl.cc
448fe9a2383222633194754de34e6a3c0351ac68 09-Aug-2012 Alexander Potapenko <glider@google.com> Use a switch instead of a simple condition in force_interface_symbols().
Otherwise Clang eliminates everything after the first interface symbol that is marked noreturn.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161573 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
e4bfca2b154a6ab4eda921aff454035f33f3551a 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] move code that describes globals to asan_report.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161572 91177308-0d34-0410-b5e6-96231b3b80d8
san_globals.cc
san_report.cc
san_report.h
e218beb2d14b663bd277158f386a86d0e62fef74 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] move some functions that describe addresses to asan_report.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161571 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.h
san_globals.cc
san_internal.h
san_report.cc
san_report.h
san_rtl.cc
487fee7f6f7497906a00d7d2fe2c75e6d5d4feb1 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Move error reporting code away from file with interceptors

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161570 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_report.cc
san_report.h
f7c1d18183d2dfbd02864cf47b3239d6a5d717c0 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Move error reports away from ASan allocator. Add new source file to CMakeLists as well

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161569 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_allocator.cc
san_report.cc
san_report.h
7354509ec8a37262c5ea0c54f99afee8a5116ce5 09-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Create new files asan_report.{h,cc} as a preparation for refactoring of ASan error reporting code.
Currently ASan reports many kinds of errors, and the code that actually prints error messages can
be found inside allocator, OS-specific files, interceptors code etc.

An example of maintenance troubles this situation causes:
There is currently an ASan interface function that registers
callback which should take the char buffer with error report printed by ASan.
This function is now broken, as one has to insert callback calls to all the places in
ASan code where the error reports are printed, surprisingly it is not only
"__asan_report_error" function...


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161568 91177308-0d34-0410-b5e6-96231b3b80d8
san_posix.cc
san_report.cc
san_report.h
9b7409ad61a3448f44fa9911debdd52ad0a6d3c8 07-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] simplify cmake rules for adding lit testsuites

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161412 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/CMakeLists.txt
6ffcb580a0b1a086c4ffa1f943ed983c2bc6b97d 07-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] add llvm_tools_dir to lit.site.cfg for ASan and add it to PATH

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161411 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/lit.site.cfg.in
4afc63c18f7d811f31dbd2e5d825ce9d10c93dec 07-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] Add support for running unit tests by lit (as a part of 'make check-asan' command)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161406 91177308-0d34-0410-b5e6-96231b3b80d8
it_tests/CMakeLists.txt
it_tests/Unit/lit.cfg
it_tests/Unit/lit.site.cfg.in
it_tests/lit.site.cfg.in
ests/CMakeLists.txt
6dd1dde531b8fb6cf7a3e1dcda86170f6ac3a988 06-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix names of malloc/free replacements on Android

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161322 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_linux.cc
4e21c6bc78bdc36736cd61639a160ea5f725b333 06-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] add new ASan option 'strip_path_prefix' to remove useless prefices from filenames in stack traces

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161321 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
san_stack.cc
utput_tests/test_output.sh
utput_tests/use-after-free.c
531c7d983da8debc447c1b3f9aee76a291376705 06-Aug-2012 Alexander Potapenko <glider@google.com> AllocationSize(ptr) should check that |ptr| actually points to the beginning of the chunk it belongs to.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=86



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161320 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
51584046b5a19fcc3ef47a0ade2e88b58ded7e81 06-Aug-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to compiler-rt upstream.

Change-Id: Icf463f4b5aa004794ace9acb34a22e434ae71b53
ndroid.mk
57cdbbc3ec7ac5ec4a467d48b42226d674aebbf7 06-Aug-2012 Shih-wei Liao <sliao@google.com> Merge with compiler-rt upstream r159129.

Conflicts:
lib/asan/asan_mapping.h

Change-Id: Id688bc0eab234e600214216ebc469cdf01ac506c
897e89f84c42bd166521684c1aedb7d5bec6954b 02-Aug-2012 Alexander Potapenko <glider@google.com> Implement LinuxSymbolizer instead of symbolize_addr2line.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161181 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
8e39869fdc1c56eeaedb6b793e5ada67f41925f3 02-Aug-2012 Alexander Potapenko <glider@google.com> Some refactoring for asan_symbolize.py: introduced the Symbolizer class and implemented DarwinSymbolizer for atos-based symbolization, BreakpadSymbolizer for breakpad-based symbolization (files produced by the dump_syms tool, http://code.google.com/p/google-breakpad/source/browse/#svn%2Ftrunk%2Fsrc%2Ftools%2Fmac%2Fdump_syms) and ChainSymbolizer to allow falling back if a symbolizer hadn't succeeded.
Fixed pylint warnings.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161176 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
37b3fcd6fdec5740fe51fc1315c5d4d54313de98 02-Aug-2012 Alexander Potapenko <glider@google.com> Make strcat() and strncat() more standard-compliant (check for invalid parameters even if zero bytes is copied, more accurate overlap check)
Fix the tests that were relying on the incorrect behavior.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161167 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ests/asan_test.cc
3dc47e5969979689dbf5f3743f501cd2beac03cc 01-Aug-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Make ASan/TSan sources depend on headers from interception library

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161113 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.mk
fd2ae4fc7df0e5acd200f30d87bbc6b96830a989 01-Aug-2012 Alexey Samsonov <samsonov@google.com> [ASan] cleanup interceptors code - prefer ASAN_INTERCEPT_FUNCTION_NAME macro to _WIN32, __APPLE__ etc.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161109 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
7274ff82fab3b167514e2aba81aa775d9fd73ca8 31-Jul-2012 Alexey Samsonov <samsonov@google.com> First tiny move towards integrating AddressSanitizer regressions test into LLVM lit-based testing infrastructure.
The goal is to be able to run ASan tests by simply running "make check-asan" command from CMake build tree:
* tests should use fresh clang binary from current build tree.
* tests should use the same RUN-lines syntax as llvm/clang reg tests.

Next steps:
- restricting tests to machines where target is equal to host, i.e. where we can produce working binaries.
- moving AddressSanitizer unit tests to lit as well.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161050 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
it_tests/CMakeLists.txt
it_tests/deep_tail_call.cc
it_tests/lit.cfg
it_tests/lit.site.cfg.in
970a9b9c6c6bb894557fe2d1779118ee8c3070d8 31-Jul-2012 Alexander Potapenko <glider@google.com> Factor out the main() function.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161046 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
b0bb7fb31301ee9ac9cf41f21d3a19987dc30609 30-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix cmake build warning

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160957 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
837279471ab81dcb732230ff67656030b4d75ee9 27-Jul-2012 Stephen Hines <srhines@google.com> am 213fe112: Merge changes I25b72142,I4800ba14

* commit '213fe1121889ea8a2c23f78f189d8f48a59dde3c':
Update for ASan cherry-pick.
[asan] ensure that asan_init is called in str[n]cmp. Bug found by Nick Kralevich (thanks)
4800ba143bc7ad9eb5236f89ab6aa3c2474ba160 27-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] ensure that asan_init is called in str[n]cmp. Bug found by Nick Kralevich (thanks)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160853 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
8648e7734ff02a25706464e9e294bd217622bcae 27-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] ensure that asan_init is called in str[n]cmp. Bug found by Nick Kralevich (thanks)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160853 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
4d57f44ae53d766d77fd21ceee5f0b7e56429b04 25-Jul-2012 Alexey Samsonov <samsonov@google.com> cmake for compiler-rt: add a function to set output dirs for compiler runtimes equal to directory used by Clang driver. Use it for ASan runtime. Also, make sure that ASan unit tests depend on the ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160721 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
b831086e7c1e6004cf57594ec81b662f290dc2ac 25-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] don't return from a never-return function. fix a test that had a chain of bugs instead of just one

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160719 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
ests/asan_noinst_test.cc
b750c4c8af128bdd63543f3715f2c147fc3e95bf 25-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] fixup for r160712: provide a default definition for weak __asan_default_options()

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160718 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
8a1dd56a284de3bb94ebcfaace49266bdf0d26c1 25-Jul-2012 Alexander Potapenko <glider@google.com> Make __asan_default_options a weak function that returns a const char*.
Users may define it to override the default ASan options.
This function has to be marked with __attribute__((no_address_safety_analysis)), because it is called before ASan is fully initialized.

Add an output test checking the __asan_default_options functionality.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160712 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_rtl.cc
utput_tests/default_options.cc
utput_tests/test_output.sh
b0af63965aeab26c463dd761f5b2b9cf8560065b 24-Jul-2012 Alexey Samsonov <samsonov@google.com> Revert r160669 (except for compile flag updates)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160671 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
a43a62a25c55b811052249380cb6d2f7d020a8fc 24-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] hacking cmake build: after generating asan runtime, copy it to the Clang lib directory where Clang driver expects to find it.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160669 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
1a7741b4e3c50a986502507fa8055475dd0fa0d0 24-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] Support for cmake build of ASan unittests in 32-bit LLVM build. Currently, to run ASan unit tests both for 32- and 64 bits one has to maintain two distinct LLVM builds. In a bright future, we'd like to use a single build for this

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160666 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_break_optimization.cc
ests/asan_noinst_test.cc
75b19ebf25af204cf209d108997272822241d6da 23-Jul-2012 Alexander Potapenko <glider@google.com> Intercept CFAllocator for each thread in the program.
Test that child threads use the ASan allocator, that allocated memory can be passed to another thread and deallocated on it.
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=81


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160630 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_mac.cc
san_mac.h
san_malloc_mac.cc
san_thread.cc
san_win.cc
ests/asan_mac_test.h
ests/asan_test.cc
63201b127e21d6fbfb6de62d0e44a5de01288153 23-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] minor fixes to silence cmake build warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160624 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
79d12e87fbcc1b2342d76367b99b83adf9cbf499 23-Jul-2012 Alexander Potapenko <glider@google.com> For wild addresses in the shadow or shadow gap areas print an error message instead of crashing on a check.
Add AddressSanitizer.MemsetWildAddressTest that makes sure a proper error message is printed.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160620 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_mapping.h
san_rtl.cc
ests/asan_noinst_test.cc
08e80a43a4046f50270cc86b5ad3a16b94375f97 19-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] subtract one from PCs in ASan error reports (as they originally contain return addresses). Make output tests stricter.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160508 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
utput_tests/heap-overflow.cc
utput_tests/large_func_test.cc
utput_tests/null_deref.cc
utput_tests/shared-lib-test.cc
utput_tests/strncpy-overflow.cc
utput_tests/use-after-free.cc
cripts/asan_symbolize.py
c603ad2a1ce425d7f3f74102c9d9fd37b1aea847 19-Jul-2012 Alexander Potapenko <glider@google.com> Suppress the stderr output from atos.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160502 91177308-0d34-0410-b5e6-96231b3b80d8
cripts/asan_symbolize.py
b134ffa00ce2a4cbf7f48ac029e31c3e6e23ff6b 17-Jul-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of the last operator new call in asan rtl

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160347 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
san_thread.cc
san_thread.h
9b1b10193420f5adc769eda0d5bd548e429e0ce2 10-Jul-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] fix CMake build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159988 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
7ed1d2b699767dd1875994cb625d51a95b44221a 10-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] move flags description to separate header, add comments about them.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159985 91177308-0d34-0410-b5e6-96231b3b80d8
san_flags.h
san_interface.h
san_internal.h
san_rtl.cc
4fbbcbea41c91498ac4cfbb3d3c7e1d83d7bb380 09-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] cleanup: remove dead flag

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159934 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_rtl.cc
cb8c4dce691097718d5af41b36899b72ef4b1d84 09-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] Use common flags parsing machinery.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159933 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_globals.cc
san_interceptors.cc
san_internal.h
san_linux.cc
san_mac.cc
san_malloc_mac.cc
san_poisoning.cc
san_posix.cc
san_rtl.cc
san_stack.cc
san_stack.h
san_thread.cc
san_thread_registry.cc
0fedcd5abe8e9d51dc7177cf2fa239d9b83e270b 06-Jul-2012 Alexander Potapenko <glider@google.com> Small fix: do not replace the default CFAllocator if it has been replaced already.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159824 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
23a3b760646aab699d29896d4feaf2fc84ec3955 06-Jul-2012 Alexander Potapenko <glider@google.com> Because CFAllocatorCreate() should also be called after __CFInitialize() on Lion,
do so by factoring the CFAllocator logic into ReplaceCFAllocator(), which is called from
either the __CFInitialize wrapper or __asan_init(), depending on which of them is called later.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159822 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
bf9f6fbf015f687784e26f26570924be4ca3924f 06-Jul-2012 Alexander Potapenko <glider@google.com> A portable way to check whether __CFInitialize has been called: compare kCFAllocatorSystemDefault._base._cfisa to 0.
This should fix http://code.google.com/p/address-sanitizer/issues/detail?id=87 on both Lion and Snow Leopard.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159821 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_mac.h
san_malloc_mac.cc
d079db6dfbf3b0ec5fa1cc8d093e0dae6f970bf8 06-Jul-2012 Alexander Potapenko <glider@google.com> Do not check for __CFRuntimeClassTableSize on non-10.6 systems, where this symbol is private.
This change may cause http://code.google.com/p/address-sanitizer/issues/detail?id=87 to re-appear on Lion.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159819 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_mac.h
san_malloc_mac.cc
decaec9ee3177b5e81e358ad8e93ab70b38a1cc0 05-Jul-2012 Alexander Potapenko <glider@google.com> Fix http://code.google.com/p/address-sanitizer/issues/detail?id=87 by making sure we replace the default CFAllocator only after __CFInitialize has been called.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159749 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_malloc_mac.cc
e93be8414babdb4f4dbb31dc8b34a81809ca7c11 04-Jul-2012 Alexander Potapenko <glider@google.com> Do not call malloc_zone_from_ptr() for the pointers passed to mz_size() and mz_free().
These callbacks assume that the memory belongs to asan_zone, so it's incorrect to pass it to another one.
If a need for this appears (e.g. system libraries free the memory using wrong zone), it should be documented.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159713 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_mac.cc
c2018c124e4b3fe463bb996e57a0d7aa552b12f4 04-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] Minor fix in symbolizer output.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159709 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
a68633fb76208137ccb807914df52758ee5ca6f0 03-Jul-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Extend a symbolizer code. Implemented for Linux only. Use dl_iterate_phdr to get virtual addresses of mapped module sections. To symbolize an address from a module, map this module to memory and obtain pointers to debug info sections. Later these pointers can be passed to constructor of DWARF context-in-memory from LLVM DebugInfo lib.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159652 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
62f294020ce5d60dc51883e7708a56247c366d14 02-Jul-2012 Alexey Samsonov <samsonov@google.com> [ASan] cmake cleanup: make tab/space padding in CMakeLists consistent, silence/fix some pedantic warnings

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159514 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
san_thread_registry.h
c04d8b39795b8faab2c172da59462f4e54823533 29-Jun-2012 Dmitry Vyukov <dvyukov@google.com> tsan/asan: unify ScopedLock


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159438 91177308-0d34-0410-b5e6-96231b3b80d8
san_lock.h
fce5bd4cc29fddb5e8f0cb9c12df7c10187a991d 29-Jun-2012 Dmitry Vyukov <dvyukov@google.com> tsan/asan: unify atomics (move atomics from tsan to sanitizer_common)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159437 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_rtl.cc
dbd8aacc28bf631eb73f48611758b51e08e59f9a 29-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] cmake unit tests: explicitly add necessary linker flags when linking unit tests with asan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159420 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
2084543fc20ee58028bfab949f1502789199ff77 29-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] cmake-based unit tests: merge instrumented and non-instrumented files into one test binary

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159419 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
c9aeed824ebedb3b517826e648adcedc20103c46 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix the build - erase second main as we link all test sources together

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159348 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_noinst_test.cc
d00ecb64892dcb03c5ae93a654da669b96753b01 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] silence various warnings in cmake build of asan unit tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159347 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_noinst_test.cc
37dd1d78906228d412caf05102106773dfa7222f 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] cmake support for running asan unit tests on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159345 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
ests/asan_mac_test.mm
79753b2c945b590e9a60a2ac2d96c088f920a905 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] update cmake rules so that ASan unit tests can include googletest (and, hence, llvm) headers when they are built by fresh Clang

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159343 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
b4fefa713da3dabda1cd83ae4182c71f1683f02c 28-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] cleanup: trailing semicolons, trailing colons in enums

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159338 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_interceptors.cc
san_mac.cc
46d7b0bd647fa4844f9fe4ca9be31b8341ad12f5 27-Jun-2012 Evgeniy Stepanov <eugenis@google.com> Print inlined frames in the symbolized report.

With this change, symbolize.py makes use of "-i" option of addr2line tool to
get information about enclosing scopes of inlined functions.

Change-Id: Ie42a4265356d7e169e99f7f389069a9eab8963e3
cripts/symbolize.py
984f6cf119e26ec25463d58235d613bfea114127 27-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Add support for building the ASan instrumentation unit tests with the
just-built Clang binary, and linking them against the just-built ASan
runtime.

This is *very* brittle. I expect it will require tweaking, and I've
pro-actively disabled it on non-Unix builds and on cross-builds.

It is also currently missing dependency edges on GoogleTest header files
and a few other corner cases, but those can be fixed. This is the major
milestone of a mini-bootstrap-like build of the unittest.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159255 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
94cc7e121c3271693497367a0ebf35697840ad74 25-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] update the cmake file for asan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159143 91177308-0d34-0410-b5e6-96231b3b80d8
ests/CMakeLists.txt
bff533684731c89bd5e99d0cf950a86c21a342e8 25-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] move tests from asan_interface_test.cc to asan_noinst_test.cc. Now all these tests do not require instrumentation and work directly with asan rt

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159135 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
ests/asan_interface_test.cc
ests/asan_noinst_test.cc
821f21b7cdd0bcc91102f08c8ee0773fd9273046 25-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Cleanup the handling of CFLAGS even more in the cmake build for ASan.
Add the initial support for building ASan tests.

The first change here is to try to get the CFLAGS to more closely match
those used by the old Makefile. There are probably still goofs here,
ASan folks, your review would be appreciated.

The second big change is to add support for building both
instrumentation based an non-instrumentation based unittests for ASan.
They are built a bit differently from how the old makefiles managed
things. Specifically, there are two binaries, one for the
non-instrumented case, and one for the instrumented case.

Also, the instrumented unit tests rely on the host compiler supporting
AddressSanitizer's intrumentation pass. This is kind-of gross, but
I don't know of a better way yet. I've mailed llvmdev to discuss this
issue.

One big caveat is that the detection logic currently doesn't work. I've
commented it out temporarily as I'd like to get feedback from the ASan
developers, etc.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159134 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ests/CMakeLists.txt
e7539bf38e82db273708c5007bdb226c1a280b54 25-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] get rid of '#include <malloc.h>' in the implementation of malloc interceptors

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159132 91177308-0d34-0410-b5e6-96231b3b80d8
san_malloc_linux.cc
a765ffcef39dc37bd6d7e597286fd76fbeb1b9fa 25-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Another big step toward a viable CMake build system for CompilerRT,
ASan, and friends.

This explicitly switches the CompilerRT CMake build to require CMake
version 2.8.8 or newer which provides first-class support for "object"
libraries which consist of a pile of '.o' files -- exactly what is
desired for composing runtime libraries. I've gone ahead and switched to
using this.

I've also added the interception library which I missed initially. And
I've added proper dependencies between the various libraries. With this,
I'm able to build archives for asan that appear to contain all of the
necessary .o files.

The final tweak here is to start setting up the compile flags and macro
defines expected by ASan and its helper libraries. These may not be
entirely correct currently, they're based loosely on my reading of the
old Makefiles. However, they can be tweaked more easily now that they're
wired up properly.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159129 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6bae39d1db13f60d3e9b8393e5b9d9eb2ab1b5c0 25-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Lots of trivial changes to remove extraneous semicolons throughout ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159128 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.h
san_malloc_linux.cc
san_stack.h
94c54f19d4330cbf2b6fd83b65841f706e34365e 23-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] fix -Wsign-compare

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@159083 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
f4e8fc675ab52d0b3022847764a70ed7f03817bd 21-Jun-2012 Alexander Potapenko <glider@google.com> Small lint fix.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158922 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
43d03f3775677ca8e4727d49d1256de014351b95 21-Jun-2012 Alexander Potapenko <glider@google.com> Add a test for issue 81 -- AddressSanitizerMac.DISABLED_CFAllocatorDefaultDoubleFree_ChildPhread


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158921 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_mac_test.h
ests/asan_mac_test.mm
ests/asan_test.cc
39b2e6aaf20e7a3257fd0146c35cec587b3fffb0 21-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix lint error

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158905 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
effd6bf516b7109460647253aa1a62046ca9bb7a 21-Jun-2012 Alexander Potapenko <glider@google.com> Enable AddressSanitizerMac.CFAllocatorDefaultDoubleFree and AddressSanitizerMac.CFAllocatorMallocDoubleFree, which now work fine.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158886 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
0aa794d78fbb6359f81025217559f1b03ff07999 21-Jun-2012 Alexander Potapenko <glider@google.com> Factor the common code out of cf_free and mz_free.
Introduce the mac_ignore_invalid_free flag (0 by default) which makes both cf_free and mz_free ignore invalid free invocations and leak memory.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158885 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_malloc_mac.cc
san_rtl.cc
bd0fbe68a9a686454c6c5a670bca9c8d33318f93 21-Jun-2012 Alexander Potapenko <glider@google.com> Fix the output tests on Darwin


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158870 91177308-0d34-0410-b5e6-96231b3b80d8
utput_tests/use-after-free.cc
e205a9daec9ec4afed956cf5455889725b9192fb 21-Jun-2012 Alexander Potapenko <glider@google.com> Actually intercept free() to ensure that the deallocations caused by other functions directly calling it are routed to our allocator.
For the allocations that do not belong to any malloc zone check whether they're padded with a pointer to ASan's CFAllocator. If so, free the original (unpadded) pointer.
This should fix AddressSanitizerMac.NSURLDeallocation and issue 70.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158863 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
san_malloc_mac.cc
ests/asan_test.cc
df42b619de6f7cbf23a68d91a924cfb44b9fd201 20-Jun-2012 Alexander Potapenko <glider@google.com> Add a test for NSURL deallocation (issue 70)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158843 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_mac_test.h
ests/asan_mac_test.mm
ests/asan_test.cc
479d47f739a9f36cbb3cf2bfdbd01c62a7b3128f 20-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Resuming work on the compiler-rt CMake build at long long last. In order
to get it working again, two changes were needed:

- I had to give up on glob-based file expansion. This just isn't well
supported by CMake, and until we convince upstream there of its value,
it's not worth dealing with the pain.
- Add the common library as otherwise even ASan won't build.

This now builds again, although the "correctness" of it is a touch
debatable. ;] Specifically, there is no merging of the common runtime
library with the asan runtime library into a single archive file. I'm
not really sure what the best technique is for that, and it may be
influenced by the ongoing discussion about how best to link runtime
libraries.

Note of course that this is still very much WIP. It doesn't entirely
work yet, and remains disabled by the LLVM projects/CMakeLists.txt until
it is in a working state.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158811 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
de08c02aa3007a590bfb7d43f31d5b1a0e7d337c 19-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Renaming: SNPrintf -> internal_snprintf (and move it to sanitizer libc)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158710 91177308-0d34-0410-b5e6-96231b3b80d8
san_printf.cc
san_win.cc
fa82b0887fd558b77a856730a0656460d5bf078d 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use ProcessMaps in symbolizer to get module name and offset for instruction address

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158522 91177308-0d34-0410-b5e6-96231b3b80d8
san_stack.cc
c925697df6626bb0ea27ea96539bf0580f8f3d3d 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move all the rest re-implementations of libc functions from ASan runtime to common sanitizer runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158519 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
san_internal.h
san_rtl.cc
88207ab15125e2f1e9b3d541b735b2b8aba9b6d9 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use DEFINE_REAL macro in TSan runtime to call libc implementations of functions. Move strchr to sanitizer_libc.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158517 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
dd3a911e46b3f0416d60d9be5c84ccfc4b1c3aa8 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move ShadowRangeIsAvailable and several defines to common runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158499 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_posix.cc
san_rtl.cc
san_win.cc
4c49666e611f06241bb8462cea7674d877241492 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move atomic ops, min/max and sort to commnon runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158496 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_posix.cc
san_win.cc
fa3daaf1d66314658e7c05bf63dc825d179f2faf 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move more portability wrappers to common runtime: sleep, _exit, abort, atexit, pthread_self

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158493 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_posix.cc
san_thread_registry.cc
san_win.cc
be7420cc79d8580eb354666eef638d39ee9cff80 15-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move DumpProcessMap and DisableCoreDumper to common runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158490 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_posix.cc
san_rtl.cc
san_win.cc
f607fc1c67a613a59a1db3c80c5d1322e1978102 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move rest of mmap routines to common sanitizer runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158452 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_mac.cc
san_rtl.cc
san_win.cc
3dbeabb3446f203156ae03d957de9bdf50933ae4 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] move portable GetEnv to common sanitizer runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158451 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_mac.cc
san_rtl.cc
san_win.cc
327c1c17d9557ed8b197f732c8a070fd6ba821b5 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Move internal_memcmp to common sanitizer libc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158450 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
996651d09e56caa91ffcc33bf1a13a283cfcd5e2 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] don't include deleted header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158448 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mac.cc
san_posix.cc
san_stack.cc
san_thread.cc
san_win.cc
fc1415aa189d10317aa5f9923a3fc98706ed9e51 14-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] remove obsolete header asan_procmaps.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158447 91177308-0d34-0410-b5e6-96231b3b80d8
san_procmaps.h
4fac1482179c6bfd84fa129560caa43f341c7336 08-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] add internal_memset and internal_strrchr to sanitizer_common/

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158202 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
a1a25c1afe38e59ffb342c24bb5bb10d05679df7 08-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] allow calls to memmove during rtl initialization

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158201 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
c1bdd5adca453f2fae238a4c53ade35ae60b85da 08-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] add interceptor for strncat

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158198 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ests/asan_test.cc
0334fc8564e91d5ebd495066bb263af36331fe61 07-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] slow 16-byte redzones (still experimental)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158143 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_rtl.cc
ed996f79710f532bf231537e44d5c8c9c9d57e8d 07-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Fix mac build.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158141 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
e5931fd7d2a74fd7fb60bd8d7f644cca51a24364 07-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] factor out GetThreadStackTopAndBottom from ASan runtime to common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158140 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mac.cc
san_thread.cc
san_win.cc
6895adc39c4e09371154c8037366ad4464163ed0 07-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] __asan::AsanProcMaps -> __sanitizer::ProcessMaps.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158139 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mac.cc
san_posix.cc
san_procmaps.h
san_stack.cc
cffe2f5c30c27234260d004b54152916ff0c45c6 07-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Move ReadFileToBuffer to sanitizer_common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158138 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_rtl.cc
16071602d364db4a8e99575acd098d7462ef318d 06-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] more compaction: don't use the next field while the chunk is in allocated state

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158083 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
6dc48dd17d81933194366716c9e16f2e85c728b6 06-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] more allocator compaction

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158082 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
a25b3463477d2a825df4f656001fc07c594b35ac 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Switch to common mmap/munmap routines in ASan run-time.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158078 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_linux.cc
san_mac.cc
san_posix.cc
san_rtl.cc
san_thread.cc
san_win.cc
8c53e54ef9e713953ec9495e82e5c330b96e49f3 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Make UNIMPLEMENTED macro common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158077 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
f4a4d5a9a01663e74e6d8c2de3468df31245f39a 06-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] more compaction for allocator

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158076 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
15a77612e0a89c1df444a2034e531c8968d0cedf 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use common CHECK machinery. Currently each tool has to define its own CheckFailed function.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158075 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_rtl.cc
e0cff0bc20ae51790c8edfbceb817e18ebf5355e 06-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] make tid u32 instead of int

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158074 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_interceptors.cc
san_mac.cc
san_posix.cc
san_rtl.cc
san_thread.cc
san_thread.h
san_thread_registry.cc
san_thread_registry.h
san_win.cc
7ebac9534c484b06a0c2822d83f082a127e743bc 06-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] start compacting the allocator header, the goal is to make it 16 bytes w/o losing any information

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158072 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_posix.cc
san_win.cc
7fdcdf5a3a7090ec86d426a815bb42f3d35adf13 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Remove __attribute__((format))

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158070 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
675293d458c9f6c797a7211c11438eb9bfcfe9bb 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] match type of arguments to format string on Mac.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158068 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
e954101f6602ac181a2c3accfbbad0ae51b0bf7c 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer]: Introduce a common internal printf function. For now, also use tool-specific wrappers TsanPrintf (its output is controlled by TSan flags) and AsanPrintf (which copies its results to the ASan-private buffer). Supported formats: %[z]{d,u,x}, %s, %p. Re-write all format strings in TSan according to this format (this should have no effect on 64-bit platforms).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158065 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_globals.cc
san_interceptors.cc
san_internal.h
san_malloc_mac.cc
san_posix.cc
san_printf.cc
san_rtl.cc
san_stack.cc
san_stats.cc
san_thread.h
e4309e8141382372465ea065e86d8f946aa99c38 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] more format fixes

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158060 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
5bcca4e33ececdddd8e9e07619c129e870492251 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Make printf arguments match format strings better.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158059 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_globals.cc
san_poisoning.cc
san_posix.cc
san_rtl.cc
san_thread.cc
san_thread_registry.cc
230c3be6cdd094a187f48e27ba0961dbeee70344 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Move more functions/constants to sanitizer_common.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158056 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
san_internal.h
san_posix.cc
san_win.cc
47657ce6cbac2fa93d0fd765c5d2872443b50e87 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Use __sanitizer::Die() in ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158051 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_mac.cc
san_posix.cc
san_printf.cc
san_rtl.cc
4b6eec3b3e1fd8ed26aa7ed684c16bc87f0ed625 06-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix GetFreeBytesTest interface test on 32-bit Linux - delete some assumptions about the behavior of allocator in test code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158047 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_interface_test.cc
94b5036ee6ba866e1702848855b6d687d1e70afa 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] rename sanitizer_defs.h to sanitizer_internal_defs.h

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158001 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
b9a30e0799787a99147e2587ef5ecc8c5f224160 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] remove using namespace __sanitizer lines

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157999 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_internal.h
san_linux.cc
san_mac.cc
san_posix.cc
san_printf.cc
san_rtl.cc
san_stack.cc
0a4c906dbc8f150657ddd4f19a7192b779f1d605 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Use common defines for ASan and TSan runtime. Split defines between interface defines (can be visible in user code that includes interface ASan/TSan headers) and internal defines.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157998 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface.h
san_internal.h
san_rtl.cc
8c8c8b0ecd3a7faab499556a04c54c9de5a0f284 05-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] change the order of tests in the asan_test binary. Makes the test runs 2x faster due to DEATH_TEST overhead (see asan issue 77)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157997 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
1f11d31faa5ed89b74f7d543b1182fe8de198be5 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] add sanitizer_posix.cc. Move more various functions into sanitizer_libc: sscanf, munmap, memchr

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157994 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
san_internal.h
san_linux.cc
san_mac.cc
san_printf.cc
3f46cf42b0f8e0667a3bea88cf871ebd4dc0ecdf 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] s/size_t/uptr in asan_mac.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157993 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
2221f553886c37401b5d84923634ebf04bc482f1 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] use internal_{close,read,write} in ASan runtime.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157991 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_mac.cc
san_posix.cc
san_printf.cc
san_rtl.cc
san_win.cc
9552db72ce37a9f090be4d9fecfbe75458c6d7bb 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] use internal_open from sanitizer_libc in ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157986 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_linux.cc
san_mac.cc
san_rtl.cc
san_win.cc
6316c111d62df6521db68397a469fd3636e9ae7c 05-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Fix a typo in Makefile.old

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157982 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
982cee4a0d08dfbf1896477c76d0506fc6851af0 04-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Enable lint for sanitizer_common/

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157931 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
ae4d9caa4f47fa6abcd641719e9f520622940c17 04-Jun-2012 Alexey Samsonov <samsonov@google.com> Created files sanitizer_linux.cc and sanitizer_mac.cc for platform-specific implementations of common functions. Turned asan_mmap into __sanitizer::internal_mmap.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157930 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mac.cc
e5f5895bda30f374b0b51412fd4d837fa59aed66 04-Jun-2012 Alexey Samsonov <samsonov@google.com> Remove file-type tags for .cc files in ASan run-time library

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157927 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_globals.cc
san_interceptors.cc
san_malloc_linux.cc
san_malloc_mac.cc
san_malloc_win.cc
san_new_delete.cc
san_poisoning.cc
san_printf.cc
san_rtl.cc
san_stack.cc
san_stats.cc
san_thread.cc
san_thread_registry.cc
ests/asan_benchmarks_test.cc
ests/asan_break_optimization.cc
ests/asan_globals_test.cc
ests/asan_interface_test.cc
ests/asan_noinst_test.cc
ests/asan_test.cc
c0d78c1de1f2607c874020d27b72cf989c5ce092 04-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer]: move internal_strcmp to sanitizer_common

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157926 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
5f2fe37bd979f18703a6b3b5bf71d18fca19b245 04-Jun-2012 Alexey Samsonov <samsonov@google.com> [ASan] Use ASan option symbolize to turn on internal symbolizer (in development)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157924 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
san_stack.cc
3836ff2733d40e1182e301ef7de3eff9469777ae 04-Jun-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] Move internal_strncpy to sanitizer_libc (and make its behavior conforming to manual)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157922 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
san_interceptors.h
san_printf.cc
cfd605e96209d18c937501be870bd0308131e453 01-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] fix gcc build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157807 91177308-0d34-0410-b5e6-96231b3b80d8
san_new_delete.cc
45c8d1b28305b8660597bca3645e3ad700d76160 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] partial fix for windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157750 91177308-0d34-0410-b5e6-96231b3b80d8
san_win.cc
b49879cdb4a792048c81a96cbd91876dba34b766 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] partial fix for windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157748 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
ee3925515e4c7966f3ef489f687aa7e5692806a9 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157747 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_globals.cc
san_interceptors.cc
san_interceptors.h
san_internal.h
san_linux.cc
san_mac.cc
san_mapping.h
san_poisoning.cc
san_posix.cc
san_printf.cc
san_procmaps.h
san_rtl.cc
san_stack.cc
san_stack.h
san_thread.cc
san_win.cc
ests/asan_noinst_test.cc
3f4c3875c42078e22c7e5356c5746fd18756d958 31-May-2012 Kostya Serebryany <kcc@google.com> [asan] more renaming

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157746 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_allocator.h
san_globals.cc
san_interceptors.cc
san_interceptors.h
san_interface.h
san_internal.h
san_linux.cc
san_lock.h
san_mac.cc
san_malloc_linux.cc
san_malloc_mac.cc
san_malloc_win.cc
san_mapping.h
san_poisoning.cc
san_posix.cc
san_printf.cc
san_procmaps.h
san_rtl.cc
san_stack.cc
san_stack.h
san_stats.cc
san_stats.h
san_thread.cc
san_thread.h
san_thread_registry.cc
san_thread_registry.h
san_win.cc
ests/asan_noinst_test.cc
9aead37421a6e4bf43265e5195c6ac31fc519982 31-May-2012 Kostya Serebryany <kcc@google.com> [asan,tsan] introduce sanitizer_common/sanitizer_defs.h and perform some renaming in asan rt. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157743 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
san_allocator.cc
san_globals.cc
san_interface.h
san_poisoning.cc
san_rtl.cc
san_stats.cc
b99941ca42b43e850aecb55998f6f4885d455892 31-May-2012 Alexander Potapenko <glider@google.com> Fix the wildcards for two output tests on Darwin.

It turns out that atos does not print the symbol names for static C++ functions correctly (one of the two leading underscores is omitted), so they remain mangled.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157742 91177308-0d34-0410-b5e6-96231b3b80d8
utput_tests/large_func_test.cc
utput_tests/null_deref.cc
16e0075746b21ed866ec3be21ef0d1e46f0efed5 31-May-2012 Kostya Serebryany <kcc@google.com> [asan,tsan] rename files in sanitizer_common to have a common prefix (sanitizer_).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157740 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
a87bdaa1eab379ae4d9a24456f41f8ae36ba33f6 30-May-2012 Alexander Potapenko <glider@google.com> Be more verbose when installing the signals.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157693 91177308-0d34-0410-b5e6-96231b3b80d8
san_posix.cc
6b6dc57066fc154fbf08440cb41db099878a14e9 30-May-2012 Alexander Potapenko <glider@google.com> Fix a bug in parsing boolean flags: we used to take the first char of the key=value string
instead of the first character of the value.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157692 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
e4781f0c5871a14e2c454d7788bae2e5c72bd336 30-May-2012 Alexander Potapenko <glider@google.com> Be less verbose when parsing the default options.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157691 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
b3cedf98a3c8545da2234c2d35cb5d687984035f 29-May-2012 Kostya Serebryany <kcc@google.com> [asan,tsan] Add a new directory compiler-rt/lib/sanitizer_common
which will contain code shared between asan and tsan run-times.

Naming is hard. If you can suggest a better name for the directory -- speak up.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157611 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
san_internal.h
san_rtl.cc
ff20f17cd0543bc9d4112831574b9bb6a0f21fc6 29-May-2012 Alexey Samsonov <samsonov@google.com> Fixing ASan build on Win: don't use __asan_default_options

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157608 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
4113f643b0d5f857e9db5e765d11dc009d10a583 29-May-2012 Alexander Potapenko <glider@google.com> Do not define ___asan_default_options on Windows.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157603 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface.h
62f10e7e8b604275ca1c7cc924f32854d04829fb 28-May-2012 Alexander Potapenko <glider@google.com> Rework the flags machinery a bit.
Clients may define the __asan_default_options char string containing the default options for the tool now.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157582 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface.h
san_internal.h
san_rtl.cc
a27d6a7b79052bf718e6a7d74c043aedafa2c4bb 28-May-2012 Alexander Potapenko <glider@google.com> More verbose check in AppendString.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157580 91177308-0d34-0410-b5e6-96231b3b80d8
san_printf.cc
f54c0e3321e2381fca3f02faefaaa6639d59c7cf 28-May-2012 Dmitry Vyukov <dvyukov@google.com> asan/tsan: rename interceptors from __xsan_xxx to __interceptor_xxx


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157569 91177308-0d34-0410-b5e6-96231b3b80d8
utput_tests/interception_malloc_test-linux.cc
utput_tests/interception_test-linux.cc
170169a677c4f0df1b0ac7486c7cc7cc468cfbd5 28-May-2012 Dmitry Vyukov <dvyukov@google.com> asan: remove static libraries on make clean


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157565 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
f2981f3bfdc7900784d446d2dde96d99fbcad756 25-May-2012 Alexander Potapenko <glider@google.com> Typo fix.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157477 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
fca72fd2741372d2e947366277258bff1092e73e 25-May-2012 Alexander Potapenko <glider@google.com> Factor ParseAsanOptions outside __asan_init



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157473 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
37931239a3671ac0d2c7865f3077b0c4f71b94b3 25-May-2012 Alexander Potapenko <glider@google.com> Introduce the check_malloc_usable_size flag (on by default).
When the flag is set to zero, we do not check for errors in malloc_usable_size.
This may be useful to work around a bug in Nvidia drivers prior to 295.*


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157472 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_rtl.cc
d1a928edc0e76937dd38bdd3c357375986737e31 25-May-2012 Dmitry Vyukov <dvyukov@google.com> asan: fix tests
depending on -m32/-m64 addr2line says either e.g. __xsan_strnlen or just strnlen



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157464 91177308-0d34-0410-b5e6-96231b3b80d8
utput_tests/heap-overflow.cc
utput_tests/strncpy-overflow.cc
utput_tests/use-after-free.cc
619e8bf99d2714c4411fefba22d54c233d93a177 24-May-2012 Meador Inge <meadori@gmail.com> Adding back a right parenthesis that was dropped in r157388.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157406 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
580469d7e40e39319cb2d3750edac4bccca18105 24-May-2012 Dmitry Vyukov <dvyukov@google.com> asan/tsan: weak interceptors
The idea isthat asan/tsan can survive if user intercepts the same functions. At the same time user has an ability to call back into asan/tsan runtime. See the following tests for examples:
asan/output_tests/interception_failure_test-linux.cc
asan/output_tests/interception_test-linux.cc
asan/output_tests/interception_malloc_test-linux.cc



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157388 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
utput_tests/heap-overflow.cc
utput_tests/interception_failure_test-linux.cc
utput_tests/interception_malloc_test-linux.cc
utput_tests/interception_test-linux.cc
utput_tests/strncpy-overflow.cc
utput_tests/test_output.sh
utput_tests/use-after-free.cc
02a063660153ab4d0430b211f4dd0b3606bcbff7 23-May-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Use zero-based shadow by default on Android.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157318 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
c99f70044d64482adbc1053f04b32bdbf0d4c057 23-May-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Move AsanShadowRangeIsAvailable() from mac to posix.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157326 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_mac.cc
san_posix.cc
f1ee2cd5e4c7a46e1188315daa2c79181f852bec 23-May-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Use zero-based shadow by default on Android.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157318 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
ed2341803878f04093f58848468926337d9ca88f 23-May-2012 Dmitry Vyukov <dvyukov@google.com> asan: fix typo in comment


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157314 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
76ac5725a74b7f304803113ec90864ec2da796a4 22-May-2012 Kostya Serebryany <kcc@google.com> [asan] nuke some old unused code

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157250 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
6f350e0d1c385189cb94ddde7b288a2533b45b32 22-May-2012 Kostya Serebryany <kcc@google.com> [asan] increase the stack size limit to 256M (yes, that happens); also CHECK that the stack size is less than that on a non-main thread

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157249 91177308-0d34-0410-b5e6-96231b3b80d8
san_linux.cc
san_thread.h
e4d141dbbaf5185f332a185c22308340657d243e 22-May-2012 Kostya Serebryany <kcc@google.com> [asan] fix one test on 32-bit Mac 10.7; enable another test on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157237 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_interface_test.cc
ests/asan_test.cc
8c505efd769a21eac7de53bc104757245af6ed4a 21-May-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan] Make for-Windows RTL compileable using Clang++

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157188 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_win.cc
c8c87202f2d26f04b6c1c7e8b301e3a97852cb8f 15-May-2012 Kostya Serebryany <kcc@google.com> [asan] fix the old-style Makefile, which we still need to run asan tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156818 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
0d49904d50fc42b411c396c472ce70f8e4575f99 15-May-2012 Kostya Serebryany <kcc@google.com> [asan] move lib/asan/interception to lib/interception so that other tools (e.g. tsan) can use it

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156816 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.mk
nterception/Makefile.mk
nterception/interception.h
nterception/interception_linux.cc
nterception/interception_linux.h
nterception/interception_mac.cc
nterception/interception_mac.h
nterception/interception_win.cc
nterception/interception_win.h
nterception/mach_override/LICENSE.TXT
nterception/mach_override/Makefile.mk
nterception/mach_override/README.txt
nterception/mach_override/mach_override.c
nterception/mach_override/mach_override.h
8ca02789a274fa46abccacad4a0820a9fe2f75f4 12-May-2012 Alexander Potapenko <glider@google.com> Increase error_message_buffer_size to 64K (16K is insufficient for large programs)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156711 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
3972ea03aa52d81ca324945ba94eea22d403df12 12-May-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix GetFrameNameByAddr hitting stale stack guards.

In the current implementation AsanThread::GetFrameNameByAddr scans the
stack for a magic guard value to locate base address of the stack
frame. This is not reliable, especially on ARM, where the code that
stores this magic value has to construct it in a register from two
small intermediates; this register can then end up stored in a random
stack location in the prologue of another function.

With this change, GetFrameNameByAddr scans the shadow memory for the
signature of a left stack redzone instead. It is now possible to
remove the magic from the instrumentation pass for additional
performance gain. We keep it there for now just to make sure the new
algorithm does not fail in some corner case.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156710 91177308-0d34-0410-b5e6-96231b3b80d8
san_mapping.h
san_thread.cc
f2b1df7cb8f53f51bcb105e0d2930d99325bb681 10-May-2012 Alexander Potapenko <glider@google.com> Fix ReadFileToBuffer to return 0 on failure (-1 is too large if returned as size_t).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156538 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
b8a0c57f15cab97957901b5c71eaac14972b71ed 25-Apr-2012 Shih-wei Liao <sliao@google.com> Add stlport for include <algorithm>. Fix build.

Change-Id: Id54d41241a9f86ac9a2119695dd03c457871c8e8
ndroid.mk
8e2ac92639f80f0c850bb91d9f51a5f149c0ae29 25-Apr-2012 Shih-wei Liao <sliao@google.com> Merge commit '034bda5eab7cda14fac0bed3a39de4a3dbce3cff' into 20120424.

Change-Id: Ie524091c0c960d8e2d53fcff1d0b8f1c988c357d
909888cda6417db5ca06199a5da51e3408fd35c5 23-Apr-2012 Alexey Samsonov <samsonov@google.com> [ASan] use CLANG_VERSION in Makefile (currently 3.2)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@155350 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
0796393f2088e3b75c4110934451160eeb037fab 23-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] fix asan issue #66 (correctly report type of the bug)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@155344 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
ests/asan_test.cc
6f262bf77b3223992f1c794829485f6995aa7434 23-Apr-2012 Alexander Potapenko <glider@google.com> Bump the LLVM minor version. This should fix our 32-bit Linux build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@155338 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
4eaa17848ed02cae465f10aa5fe095e42dbf0d61 19-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] test for issue #66

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@155127 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
034bda5eab7cda14fac0bed3a39de4a3dbce3cff 16-Apr-2012 Alexander Potapenko <glider@google.com> Partially revert r154390 (http://llvm.org/viewvc/llvm-project?view=rev&revision=154390)
Until we work out the solution for http://code.google.com/p/address-sanitizer/issues/detail?id=65 we'd better not allow
the clients to override AddressSanitizer's signal handler.

The second part of r154390 (removing the sighandler-related tests) is not reverted, because those tests were broken
and didn't test anything.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154803 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
0a27a1f97e7d089de28b39744adfc6bc61df0bf1 12-Apr-2012 Alexey Samsonov <samsonov@google.com> [asan] minor fix: pass flag -g to output tests as a part of CXXFLAGS

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154589 91177308-0d34-0410-b5e6-96231b3b80d8
utput_tests/test_output.sh
c2f2d0c008c68f237959a765f9b7d20ca2acdb98 12-Apr-2012 Alexey Samsonov <samsonov@google.com> [ASan] fix output tests - r154570 changed debug info for static functions and now they are symbolized a bit differently

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154581 91177308-0d34-0410-b5e6-96231b3b80d8
utput_tests/large_func_test.cc
73ac687e4bf9914dc7507ed18ef38cf326ef2175 10-Apr-2012 Alexander Potapenko <glider@google.com> Change the way ASan interacts with custom signal handlers.
From now on we allow the clients to override signal handlers set by ASan, but print a warning in such a case.

Remove the tests for signal() and sigaction(), because they made little sense even without this change.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154390 91177308-0d34-0410-b5e6-96231b3b80d8
san_interceptors.cc
ests/asan_test.cc
f7ceaad2919d2e26e9edea29232bc9dd8f145c42 09-Apr-2012 Alexey Samsonov <samsonov@google.com> [ASan] remove dispatch.h header once again - it's not present on Leopard, and we don't want to break the build of compiler-rt there. See https://trac.macports.org/ticket/33362

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154326 91177308-0d34-0410-b5e6-96231b3b80d8
san_mac.cc
2dcf44991a8ec1ca7c8051eb27c5ff158530bdc3 09-Apr-2012 Timur Iskhodzhanov <timurrrr@google.com> Use 'typename' instead of 'class' in template<> definitions supporting POD types

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154314 91177308-0d34-0410-b5e6-96231b3b80d8
ests/asan_test.cc
850a49ecb344a71d62347bbee8042ae13b624033 06-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] last bit for gcc compatibility

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154203 91177308-0d34-0410-b5e6-96231b3b80d8
san_interface.h
san_internal.h
4d9a9576c143fb6091b01cde3a87fc62461205c8 06-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] minor change to please gcc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154201 91177308-0d34-0410-b5e6-96231b3b80d8
san_rtl.cc
4d5f98df886051afeece1698d4bc8f154391c22d 06-Apr-2012 Alexey Samsonov <samsonov@google.com> [ASan] move replacements for new/delete to separate file

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154167 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
san_interceptors.cc
san_internal.h
san_new_delete.cc
san_rtl.cc
f8e6fee734cf5e3d061f576244b2704853148b04 06-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] add flags: disable_core, abort_on_error and unmap_shadow_on_exit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154159 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_posix.cc
san_rtl.cc
san_win.cc
31429389e6e01567d9f03ac5b4057cc58b7fe3f2 05-Apr-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan/Win] Revert the local Makefile change slipped into the prev commit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154112 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
00152bf83e075df1e83bef82ae0a00bee179a956 05-Apr-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan/Win] Fix lint warning

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154111 91177308-0d34-0410-b5e6-96231b3b80d8
akefile.old
san_win.cc
8a5d8c4d2826830b8a5bbce207145fc5436119a5 05-Apr-2012 Timur Iskhodzhanov <timurrrr@google.com> [ASan/Win] Fix build by using inline assembly instead of an unavailable intrinsic function

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154106 91177308-0d34-0410-b5e6-96231b3b80d8
san_win.cc
f1e82b8fda94535e9a646fc5fe394d9883ccfa2c 05-Apr-2012 Kostya Serebryany <kcc@google.com> [asan] make __asan::Deallocate immune to racy double-free (issue #57)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154097 91177308-0d34-0410-b5e6-96231b3b80d8
san_allocator.cc
san_internal.h
san_posix.cc
san_win.cc
f03d8afc8b8dd072c4e2884a7475ee28ac5f3f41 05-Apr-2012 Alexander Potapenko <glider@google.com> Introduce the use_sigaltstack flag (off by default), which enables using alternate
per-thread stacks for signal handling. This allows to print more verbose error reports
for stack overflows.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154092 91177308-0d34-0410-b5e6-96231b3b80d8
san_internal.h
san_posix.cc
san_rtl.cc
san_thread.cc
san_win.cc
adf331e82ff0f02f68eb3aabd94f9bbd46f94dd0 05-Apr-2012 Alexander Potapenko <glider@google.com> Allow calling GetCurrentTidOrMinusOne() before AsanThreadRegistry was initialized.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@154091 91177308-0d34-0410-b5e6-96231b3b80d8
san_thread_registry.cc
san_thread_registry.h
d51e0a05b4aefc85c356c9bddd8a24efc77721d9 05-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Initial, very rough cut at a new CMake build system for compiler-rt.
Some high-level notes:

1) An explicit goal is to support building compiler-rt as a subproject
build, checked out into the projects/compiler-rt directory. There are