[sancov] Handle fork.

Reset coverage data on fork().
For memory-mapped mode (coverage_direct=1) this helps avoid loss of data
(before this change two processes would write to the same file simultaneously).
For normal mode, this reduces coverage dump size, because PCs from the parent
process are no longer inherited by the child.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210180 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Make LSan/MSan/TSan honor the "color" flag.

Based on a patch by Stephan Bergmann.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210199 91177308-0d34-0410-b5e6-96231b3b80d8
[dfsan] Fix the declaration of dfsan_add_label.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210202 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Add install rule for Android runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210216 91177308-0d34-0410-b5e6-96231b3b80d8
[Deadlock detector] Fix CMake build rules for shared runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210232 91177308-0d34-0410-b5e6-96231b3b80d8
Remove's uses of sys/timeb.h for Android.

Android is removing sys/timeb.h because it was removed in POSIX 2008.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210235 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Use -pthread instead of -lpthread in tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210255 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Fix lit tests setup on Android.

Pass cflags in a way that's compatible with standalone compiler-rt build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210256 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Add 'asan' to asan test deps.

This sound like a good idea in general.
Also, without this on Android we get add_lit_testsuite() with empty DEPENDS
list, and it does not work well.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210257 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] asan_device_setup: extend search path

In standalone build asan-rt is stored in yet another path.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210259 91177308-0d34-0410-b5e6-96231b3b80d8
[asancov] Faster coverage in memory-mapped mode.

Use caller pc of __sanitizer_cov_module_init to figure out
when 2 sequential calls are from the same module; skip
.sancov.map file update in this case.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210267 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Reduce the stack frame size of ReportDeadlock

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210301 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] initialize fake_stack_ to 0 before we call SetThreadStackAndTls, because that may actually try to use fake_stack_ (still don't know how). Yet another case where we desperately want https://sourceware.org/glibc/wiki/ThreadPropertiesAPI

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210315 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Make ReplaceSystemMalloc optional on Android.

Don't fail if __libc_malloc_dispatch is missing; continue running
with normal linux interceptors instead.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210322 91177308-0d34-0410-b5e6-96231b3b80d8
sanitizer: document missing macro



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210329 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Better diagnostic for invalid origin id.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210331 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Partial revert of r210331.

Bots did not like it.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210332 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix wrong endianness when printing shadow.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210335 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: allow to build Go runtime with clang + enable SSE3



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210344 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix Go build with TSAN_COLLECT_STATS
Go does not have cur_thread function.



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