[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