[sanitizer] change the way SizeClassAllocator64 allocated memory from the system: instead of one huge mmap(NORESERVE) it does one huge mprotect and then does small on-demand mmaps. This allows us to call OnMap callbacks which are required to poison newly allocated memory in asan

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170097 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] fix the Android build (pread64 interceptor again)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170098 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] introduce MmapFixedOrDie and use it in SizeClassAllocator64

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170099 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] fix windows build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170101 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] replace size_t with SIZE_T in interceptors (same for ssize_t, off_t and off64_t). This is done to avoid confusion and to make the code work with compilers that define size_t w/o any includes (MSVC)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170103 91177308-0d34-0410-b5e6-96231b3b80d8
ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of
bit-patterns which are not valid values for enumerated or boolean types.
These checks are the ubsan analogue of !range metadata.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170107 91177308-0d34-0410-b5e6-96231b3b80d8
ubsan unit tests for -fsanitize=bool and -fsanitize=enum.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170109 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] add asan/lit_tests/overflow-in-qsort.cc (not fully working yet)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170111 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] more macro for conditional interception of pread functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170112 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: support MapThreadTrace() on all platforms


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170113 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] one more macro for 'read' interception

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170114 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Add new header - sanitizer_platform_interceptors.h, which should define whether or not given function should be intercepted on a given platform.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170115 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: completely disable deadlock detector for Go
seems to cause some weird stack overflow


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170116 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] add two asan flags: fast_unwind_on_fatal and fast_unwind_on_malloc to allow using the slow CFI-based unwinder

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170117 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] fix mac build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170118 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] fix win build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170119 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] don't print memory stats on CheckFailed

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170120 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Allow leading underscore in function name to please output tests on Mac

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170121 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] extend overflow-in-qsort.cc to check both unwind kinds. One more test for SlowUnwind. Move both to Linux dir (no slow unwind on Mac)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170122 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] disable lint check for line length in ASan output tests

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