sanitizer_printf.cc: guard the va_copy hack on _MSC_VER

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215932 91177308-0d34-0410-b5e6-96231b3b80d8
profile: Improve error messages on bad GCDA files

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215933 91177308-0d34-0410-b5e6-96231b3b80d8
[TSan] Add -lpthread to the test which uses pthread_ functions

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215939 91177308-0d34-0410-b5e6-96231b3b80d8
Add regression test for PR15823

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215941 91177308-0d34-0410-b5e6-96231b3b80d8
[LSan] Parse common flags from LSAN_OPTIONS even if LSan is combined with
another sanitizer.

A user may run both LSan and LSan+ASan. It is weird to pass path to leak
suppression file (or other common sanitizer flags, like "verbosity") in
"LSAN_OPTIONS" in the first case and in "ASAN_OPTIONS" in the second case.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215949 91177308-0d34-0410-b5e6-96231b3b80d8
DFSan's set label function should avoid writing to the shadow memory when the write would not change the value in memory.

When writing a label to shadow memory, don't write if the value is already set to the value being written.  This dramatically reduces real memory consumption in programs with sparse use of labels.

Test Plan: It would be nice to test that unnecessary writes are skipped, but I do not see how a unit test could do this.

Patch by Sam Kerner!

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215961 91177308-0d34-0410-b5e6-96231b3b80d8
Fix latent bug in try_compile macro and use CMAKE_EXE_LINKER_FLAGS
when testing for supported architectures, as suggested by Andy Gibbs.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216083 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Turns out we should always intercept __cxa_throw
At least check-asan works with this change.

If the change breaks anything, we'll need to add:
a) a comment describing why we have to use INTERCEPT_FUNCTION rather than
   ASAN_INTERCEPT_FUNC
and
b) a test case.




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216177 91177308-0d34-0410-b5e6-96231b3b80d8
Follow-up for r215436: use SIZE_T for strlen and wcslen interceptors.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216184 91177308-0d34-0410-b5e6-96231b3b80d8
[ubsan] Do not run Function/function.cpp on Darwin where -fsanitize=function is not supported.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216263 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Use check_library_exists to determine if libc/libstdc++ are available

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216264 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Land the trivial bits of -MD RTL support (PR20214)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216265 91177308-0d34-0410-b5e6-96231b3b80d8
[ubsan] Follow-up for r216263: fix the expected line number.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216266 91177308-0d34-0410-b5e6-96231b3b80d8
[UBSan] Add support for printing backtraces to all UBSan handlers

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216289 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Rename the ASan dynamic RT

Reviewed at http://reviews.llvm.org/D5026

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216380 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Intercept memory allocation functions in the MD CRT

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216382 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Replace CMake if/APPEND/endif with append_if

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216386 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Add /DEBUG to the MD RTL link flags

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