[lsan] Allocator for standalone LSan.

This is the first in a series of CLs implementing LeakSanitizer.
http://clang.llvm.org/docs/LeakSanitizer.html

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182245 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Thread registry for standalone LSan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182246 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Interceptors for standalone LSan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182247 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Standalone LSan initialization.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182248 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Common leak checking module.

Leak checking functionality which will be shared between
LSan/ASan/MSan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182249 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Tests for LeakSanitizer.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182250 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] CMakeLists and lit test configs for LSan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182251 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Modify ASan metadata atomically.

We need this to avoid races when ASan and LSan are used together.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182252 91177308-0d34-0410-b5e6-96231b3b80d8
Fix realloc'ing freed/invalid pointers

See https://code.google.com/p/address-sanitizer/issues/detail?id=187 for the details

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182255 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] GetUserBegin() in LSan.

Separate the notions of user-visible chunk and allocator chunk, to facilitate
ASan integration.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182256 91177308-0d34-0410-b5e6-96231b3b80d8
[libsanitizer] Introduce INTERCEPTOR_WITH_SUFFIX which is to be used for appending the __DARWIN_ALIAS() version suffixes to function names on Darwin.
This should fix asan/lit_tests/wait.cc under ASan.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182259 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Build sanitizer runtimes with debug info in Makefile build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182260 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Nuke build of static ASan runtime on Mac OS

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

Add missing call to GetUserBegin().

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182267 91177308-0d34-0410-b5e6-96231b3b80d8
Build LSan on x86_64 only if this target is supported

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182272 91177308-0d34-0410-b5e6-96231b3b80d8
[nolibc] Make GetArgsAndEnv libc-independent.

__libc_stack_end is made into a weak symbol if possible.  If libc is
not linked, read args and environment from /proc.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182276 91177308-0d34-0410-b5e6-96231b3b80d8
[nolibc] Move libc-dependent sanitizer_linux.cc code to sanitizer_linux_libcdep.cc.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182292 91177308-0d34-0410-b5e6-96231b3b80d8
[nolibc] Move GetPageSize to the individual platforms.

GetPageSize wraps sysconf(_SC_PAGESIZE) on POSIX platforms, but
sysconf resides in libc.  To make this libc-independent on Linux,
move the wrapper to sanitizer_mac.cc and return the Linux-specific
constant EXEC_PAGESIZE in the sanitizer_linux.cc implementation.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182303 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] fix asan on the platforms where the page size is not a compile-time constant (or at least where EXEC_PAGESIZE may not be trustworthy), e.g. powerpc64. 

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


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