[sanitizer] Implement wait4 and waitpid syscall hooks.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179592 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix gcc build of msan_test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179594 91177308-0d34-0410-b5e6-96231b3b80d8
[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
Wrap macro invocations in braces to supress 'suggest braces around empty body in an ‘if’ statement' warning.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179597 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Don't die in symbolizer if it can't read /proc/self/exe link

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179754 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Rework r176802: share code between Printf and Report and simplify it a bit

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179755 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Allocate fd table in user heap instead of using internal allocator. We need this to catch races on fds.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179841 91177308-0d34-0410-b5e6-96231b3b80d8
[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
Fixup for r179843: add missing header

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179844 91177308-0d34-0410-b5e6-96231b3b80d8
Improve performance of file I/O.

The fread / fwrite calls were happening for each timer. However, that could be
pretty expensive for a large number of timers. Instead, read and write the
timers in one call.

This gives ~10% speedup in compilation time.


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


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180012 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Delete unused function

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180082 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Allow clock_getres(, 0).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180090 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept getgrnam{_r}, getgrgid{_r}.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180091 91177308-0d34-0410-b5e6-96231b3b80d8
[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
[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
Revert r180082 and add a test for SetEnv function

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180098 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Unpoison the result of posix_memalign.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180101 91177308-0d34-0410-b5e6-96231b3b80d8
[MSan] Make a few interface functions accept 'const void *' instead of 'void*'

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@180102 91177308-0d34-0410-b5e6-96231b3b80d8
[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