[asan] implement __asan_loadN/__asan_storeN for out-lined asan checks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206733 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] add one more mode to run asan tests with '-with-calls', i.e. using  -mllvm -asan-instrumentation-with-call-threshold=0. This is very unfortunate since it effectively doubles the number of gunit asan tests that need to be built and run, but as long as we need out-lined calls (PR17409) I see no other way to test this workaround

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206742 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] add __asan_memset and friends

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206748 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] add a run-time flag detect_container_overflow=true/false

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206753 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: deflake test
ocasionally it fails with a slightly different report:

WARNING: ThreadSanitizer: signal handler spoils errno (pid=3674)
    #0 MyHandler(int, siginfo*, void*)
    ...
    #4 __tsan_free_hook
    #5 main signal_errno.cc:40



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206754 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept tsearch.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206755 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] enable check_printf by default for asan and tsan. We've been using this flag for a while and it seems to be stable enough for the rest of the world.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206872 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Fixed the expectation for Darwin memset test.
Added a comment about keeping the Linux/Darwin test versions in sync.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206881 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] enable LeakSanitizer (LSan) by default in asan. This only affects Linux x86_64. LSan has been used in various projects for more than half a year and we now consider it quite stable to be on by default.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206896 91177308-0d34-0410-b5e6-96231b3b80d8
[profile] Flatten profile runtime - define platform-specific code in sources, not in the build system

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206915 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: reduce number of iterations in the test
otherwise it runs for 50 seconds in debug mode



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206950 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: more precise check for "app memory" in COMPAT mode
this fires when a user makes mmap with fixed address (see the test)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206952 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] disable lsan back. :(  -- It appears that quite a few lit tests have leaks and they were not covered by out buildbot

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206955 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix atexit handling after fork
fixes issue http://code.google.com/p/thread-sanitizer/issues/detail?id=57



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206980 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Disable chained origins in signal handlers.

StackDepot is not async-signal-safe; storing a new origin to it can deadlock.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206983 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Move the shadow range on 32-bit iOS (and iOS Simulator)
to 0x40000000-0x60000000 to avoid address space clash with system libraries.
The solution has been proposed by tahabekireren@gmail.com in https://code.google.com/p/address-sanitizer/issues/detail?id=210
This is also known to fix some Chromium iOS tests.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207002 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] enable use_sigaltstack by default (this will provide verbose reports on stack-overflow instead of silently crashing with SEGV)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207099 91177308-0d34-0410-b5e6-96231b3b80d8
Add DLL thunks for recently-added memcpy, memset and memmove ASan intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207113 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: stop background thread when sandbox is enabled
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=56



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207114 91177308-0d34-0410-b5e6-96231b3b80d8
Add user-defined callback on write() calls.

Add dfsan_set_write_callback(), which sets a callback to be invoked when
a write() call is invoked within DFSan instrumented code.

Patch by Sam Kerner!

Differential Revision: http://reviews.llvm.org/D3268

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207131 91177308-0d34-0410-b5e6-96231b3b80d8