[ASan] Support the asan_loadN/asan_storeN functions in the DLL thunk library

Summary:
This is required for linking DLLs with large functions exceeding
san-instrumentation-with-call-threshold.  One such function is
vp9_fdct16x16_sse2 in libvpx.

Reviewers: timurrrr

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D4758

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214532 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the waitid sanitizer interceptor to work on FreeBSD in 32-bit mode
Differential Revision: http://reviews.llvm.org/D4670


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214543 91177308-0d34-0410-b5e6-96231b3b80d8
Add FreeBSD support to the address sanitizer's deep_stack_uaf.cc test case
Differential Revision: http://reviews.llvm.org/D4668


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214544 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Use metadata to pass source-level information from Clang to ASan.

Instead of creating global variables for source locations and global names,
just create metadata nodes and strings. They will be transformed into actual
globals in the instrumentation pass (if necessary). This approach is more
flexible:
1) we don't have to ensure that our custom globals survive all the optimizations
2) if globals are discarded for some reason, we will simply ignore metadata for them
   and won't have to erase corresponding globals
3) metadata for source locations can be reused for other purposes: e.g. we may
   attach source location metadata to alloca instructions and provide better descriptions
   for stack variables in ASan error reports.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214604 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] intercept sized operator delete[]

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214704 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] introduce __asan_poison_cxx_array_cookie. This is asan-rt part of PR19838 (Left OOB accesses on new[]-allocated arrays with array cookies are not detected). No tests yet. They will follow once I commit the clang part.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214711 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] poison array cookies only on 64-bit arch

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214713 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Turn SuppressionContext::Init() into InitIfNecessary().

Suppression context might be used in multiple sanitizers working
simultaneously (e.g. LSan and UBSan) and not knowing about each other.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214831 91177308-0d34-0410-b5e6-96231b3b80d8
[UBSan] Allow to suppress reports from vptr checker for specified types.

Based on http://reviews.llvm.org/D4702 by Byoungyoung Lee!


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214833 91177308-0d34-0410-b5e6-96231b3b80d8
The test doesn't export ASAN_OPTIONS, so $ASAN_OPTIONS should not be used in RUN lines.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214855 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Handle SEH exceptions even with -GS

This is a follow-up to r213654, r213656, r213667 and r213668.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214861 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: allocate vector clocks using slab allocator

Vector clocks is the most actively allocated object in tsan runtime.
Current internal allocator is not scalable enough to handle allocation
of clocks in scalable way (too small caches). This changes transforms
clocks to 2-level array with 512-byte blocks. Since all blocks are of
the same size, it's possible to cache them more efficiently in per-thread caches.




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214912 91177308-0d34-0410-b5e6-96231b3b80d8
Segregate FreeBSD-specific parts from sanitizer_procmaps_linux.cc
Differential Revision: http://reviews.llvm.org/D4555


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214955 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Try to fix Go runtime build

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215000 91177308-0d34-0410-b5e6-96231b3b80d8
Add FreeBSD support to the address sanitizer's malloc_context_size.cc test case
Differential Revision: http://reviews.llvm.org/D4665


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215081 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix fcvt interceptor.

fcvt() result can be heap-allocated and must be unpoisoned.


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


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215112 91177308-0d34-0410-b5e6-96231b3b80d8
Support getting process maps for sanitizers needs on FreeBSD in 32-bit mode
Differential Revision: http://reviews.llvm.org/D4807


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215185 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Print out a big warning and continue without checking for success if SymInitialize() fails

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215203 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Determine which compiler-rt libraries are supported on
a given platform in a top-level CMakeLists.txt to use it both
in lib/ and in test/ subdirectories. Move architecture/platform
checks to config-ix.


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