tsan: disable flaky debug check

see the comment for details



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224507 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: don't crash with NULL deref during reporting

tctx==NULL crash observed during deadlock reporting.
There seems to be some bugs in the deadlock detector,
but it is still useful to be more robust during reporting.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224508 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add a stress test for deadlock detector

currently disabled because fails



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224509 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: disable the test even harder

currently it fails in cmake build with weird errors:

/tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `__clang_call_terminate':
/ssd/src/llvm/projects/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate[__clang_call_terminate]+0x12): undefined reference to `__cxa_begin_catch'
/ssd/src/llvm/projects/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate[__clang_call_terminate]+0x17): undefined reference to `std::terminate()'
/tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `std::vector<int, std::allocator<int> >::_M_check_len(unsigned long, char const*) const':
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:1339: undefined reference to `std::__throw_length_error(char const*)'
/tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
/tmp/real_deadlock_detector_stress_test-68a5ae.o:(.eh_frame+0x63): undefined reference to `__gxx_personality_v0'
clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224511 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix failing CHECK In deadlock detector
and re-enable the test



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224518 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix deadlock reporting

currently deadlock detector reports effectively random stacks in report after flush
because it looks at old edges with wrong stacks



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224519 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Fix GetRSS on Linux with non-4k pages

Summary:
The numbers in /proc/self/statm are in pages, not in fixed 4k units.
This fixes Linux/hard_rss_limit_mb_test.cc on my PowerPC64 box which
has 64k pages.

Reviewers: kcc, willschm

Reviewed By: willschm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224522 91177308-0d34-0410-b5e6-96231b3b80d8
Fix suppressions file usage

Summary:
Always quote suppressions files given to *_OPTIONS.
This will make it not break when given full Windows paths (otherwise,
parsing would stop after the drive's letter + ':').

Also fix one or two cases where the suppression files' extensions were
not *.supp.

Reviewers: samsonov, kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224529 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix data races between signal handler and sigaction

signal handler reads sa_sigaction when a concurrent sigaction call can modify it
as the result in could try to call SIG_DFL or a partially overwritten function pointer



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224530 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: disable __tls_get_addr interceptor

see the added comments for details, it's messy



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224531 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add an additional test for signal handlers

the test passes now, but signal handling during thread creation
and shutdown is tricky



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224532 91177308-0d34-0410-b5e6-96231b3b80d8
fix asan64 mapping
basic changes to support lsan for mips
change lsan allocator for mips
update TLS for mips
fix old patches
setup lsan testing framework