[TSan] Fix a typo ThreadIgnoreSyncEnd. Found by inspection

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205531 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Fix a rare deadlock on multithreaded fork.

If a multi-threaded program calls fork(), TSan ignores all memory accesses
in the child to prevent deadlocks in TSan runtime. This is OK, as child is
probably going to call exec() as soon as possible. However, a rare deadlocks
could be caused by ThreadIgnoreBegin() function itself.

ThreadIgnoreBegin() remembers the current stack trace and puts it into the
StackDepot to report a warning later if a thread exited with ignores enabled.
Using StackDepotPut in a child process is dangerous: it locks a mutex on
a slow path, which could be already locked in a parent process.

The fix is simple: just don't put current stack traces to StackDepot in
ThreadIgnoreBegin() and ThreadIgnoreSyncBegin() functions if we're
running after a multithreaded fork. We will not report any
"thread exited with ignores enabled" errors in this case anyway.

Submitting this without a testcase, as I believe the standalone reproducer
is pretty hard to construct.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205534 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix compilation of a disabled test.


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


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205614 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] fix a leak in __tls_get_addr handler; introduce a run-time flag to disable this handler completely; remove a workaround for a bug fixed in glibc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205617 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Introduce MsanThread. Move thread-local allocator cache out of TLS.

This reduces .tbss from 109K down to almost nothing.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205618 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: improve error message in test
we've seen a flake on this test
next time it happens we will be able to gather some info



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205619 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Explicitly specify -ldl/-lpthread in RUN-lines where needed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205623 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept a subset of sunrpc interface (xdr_*).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205627 91177308-0d34-0410-b5e6-96231b3b80d8
Update arc config to new domain.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205702 91177308-0d34-0410-b5e6-96231b3b80d8
Declare _DYNAMIC and dl_phdr_info in asan_linux.cc on FreeBSD

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205852 91177308-0d34-0410-b5e6-96231b3b80d8
Enable building of sanitizers on FreeBSD

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205919 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] mprotect() more memory to detect user code outside of application range.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206028 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] Fix false positive on xdr*_create.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206030 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] Fix output tests.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206031 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: ignore interceptors from symbolizer
ocassionally we see races coming from symbolizer interceptors (e.g. memcmp)
reproducible only only on large complex programs



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206034 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix vector clocks
the new optimizations break when thread ids gets reused (clocks go backwards)
add the necessary tests as well



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206035 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: serialize report printing in standalone deadlock detector
otherwise reports get intermixed



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206043 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] provide better reports for cases where memcpy/etc get negative size parameter. Also fix a typo found by Tetsuo Kiso

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206158 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] don't use bool in public interface, make sure the interface headers are usable in plain C

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