[sanitizer] use 16-byte aligned bzero in performance critical place (mostly for lsan)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195549 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Use real memset to clear memory in standalone LSan.

Performance improvement. Also, the allocator was using CompactSizeClassMap for
no good reason, so I switched it to DefaultSizeClassMap.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195570 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Do not clear memory which comes from secondary allocator.

Secondary allocator is mmap-based, so the memory is already zeroed.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195571 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Un-break the Windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195624 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Follow-up fix: use #if SANITIZER_WINDOWS, not #ifdef

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195625 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Implement TwoLevelByteMap and use it for the internal allocator on 64-bit.

Summary:
Implement TwoLevelByteMap and use it for the internal allocator on 64-bit.
This reduces bss on 64-bit by ~8Mb because we don't use FlatByteMap on 64-bits any more.

Dmitry, please check my understanding of atomics.

Reviewers: dvyukov

Reviewed By: dvyukov

CC: samsonov, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2259

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195637 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Unbreak standalone LSan's initialization by making it more like ASan's.

No longer allow interceptors to be called during initialization, use the preinit
array (instead of initializing at the first call to an intercepted function) and
adopt the calloc() hack from ASan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195642 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Add a missing file.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195643 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: filter out more bogus fd values

people do close(sysconf(_SC_OPEN_MAX)) after fork, where _SC_OPEN_MAX=1200000.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195645 91177308-0d34-0410-b5e6-96231b3b80d8
[UBSan] Fix warning by specifying __extension__ before __int128

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195648 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] Unbreak lsan_testlib.cc.

Also, add missing logging output.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195652 91177308-0d34-0410-b5e6-96231b3b80d8
build-libc-list.py: Replace --{,usr,gcc}lib with flags for specific libraries.

This should allow us to cope with newer versions of GCC (and more esoteric
directory layouts).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195695 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Use ExitProcess rather than _exit on Windows to avoid calling global dtors etc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195723 91177308-0d34-0410-b5e6-96231b3b80d8
Implement a bunch of custom glibc wrappers & corresponding tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195749 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Improve external symbolizer behavior.

1) Don't start external symbolizer subprocess until we actually try to
   symbolize anything.
2) Allow to turn off external symbolizer by providing empty ?SAN_SYMBOLIZER_PATH
   environment variable.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195771 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: support synchronization by means of linux aio
http://llvm-reviews.chandlerc.com/D2269



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

- running_on_valgrind was not parsed in some contexts
- refactor code a bit
- add comprehensive tests for flags parsing



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195831 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: minor refactoring
use common helper macro



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195832 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: do not leave verbosity>0 in tests



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195833 91177308-0d34-0410-b5e6-96231b3b80d8
asan: fix android build
android does not seem to have IOCB_CMD_PREADV



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