[ASan] Make sure slow stack unwinder doesn't return empty stacks.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194107 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Disable back init-order checker. Make strict_init_order imply check_initialization_order

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194125 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Use OS-specific matches in the malloc_context_size.cc lit test.

The top stack frames for operator new and operator delete are different on Linux and Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194150 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] attempting to fix x32 build (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59018)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194155 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Call Windows unwinder 'slow' and share StackTrace::Unwind across all platforms. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194193 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Presumable fix stack trace unwinding on Windows

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194195 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Make StackTrace::Unwind the only public way to unwind a stack trace.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194196 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib 

CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib

The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code.

The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194199 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizers] Share some stack walking code between Windows and Linux

Reviewed at http://llvm-reviews.chandlerc.com/D2126

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194326 91177308-0d34-0410-b5e6-96231b3b80d8
Remove a FIXME now that I can't reproduce the problem

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194331 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Bypass pthread_attr_getdetachstate interceptor in compiler_rt code.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194369 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Sanity check for non-PIE.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194370 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Warn if interception fails.

This includes a clang-format pass over common interceptors.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194372 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] One more test for r194374.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194375 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: make assembly files compile Thumb2 with nop IT block.

ARM's UAL syntax allows the same assembly file to be compiled in both ARM and
Thumb mode. Conditional execution is handled by requiring the Thumb IT blocks,
but essentially ignoring them when compiling for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194429 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Avoid needless use of stringification (#symver) in INTERCEPT_FUNCTION_VER.

This is a workaround for clang-format bug (PR17874).


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194468 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Specify a default value for each common runtime flag

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194479 91177308-0d34-0410-b5e6-96231b3b80d8
Added summary info to GCDAProfiling.

This function will be called by GCOVProfiling to write and update object
and program summaries to be read in by llvm-cov.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194499 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] fix a leak in tds (https://code.google.com/p/address-sanitizer/issues/detail?id=233)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194572 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Don't call __asan_init() from certain interceptors on Darwin.

Fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58994, which hadn't
manifested in LLVM because libclang_rt.asan_osx_dynamic.dylib used to depend on
the Foundation framework.
Without that dependency some interceptors may be called from the system
libraries before libSystem_initializer() is called, which lead to assertion
failures in sanitizer_mac.cc (_NSGetEnviron() returns NULL).

To fix the problem we fall back to the original functions in the common
libsanitizer interceptors and the __cxa_atexit() interceptor on Darwin.

This patch also prints a better error message in the case _NSGetEnviron()
returns NULL.



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