Revert r200683.

-fno-function-sections is broken in Clang.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200684 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Resubmit r200683: disable -ffunction-sections.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200686 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Reinitialize allocator quarantine on activation.

This is covered by AddressSanitizer.UAF_* tests in asan_test
with start_deactivated=1.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200696 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] asan_device_setup.sh: allow overriding adb path.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200698 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Move GetMacosVersion() to sanitizer_common.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200700 91177308-0d34-0410-b5e6-96231b3b80d8
[libsanitizer] Follow-up for r200700: add the new header to CMakeLists.txt and make it empty on non-Mac.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200701 91177308-0d34-0410-b5e6-96231b3b80d8
[libsanitizer] Workaround for https://code.google.com/p/address-sanitizer/issues/detail?id=261
If pthread_get_stacksize_np() returns 512K for the main thread on Mavericks, obtain the stack size from the current stack rlimit.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200703 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Handle TLS sizes for glibc < 2.13; As discussed in http://gcc.gnu.org/PR60038, the hardcoded sizeof(struct thread); patch by Jakub Jelinek

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200733 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] make __tls_get_addr interceptor (more) AS-safe. No good test so far, will keep trying.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200734 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: relax check for errno spoiling more

We do not detect errno spoiling for SIGTERM,
because some SIGTERM handlers do spoil errno but reraise SIGTERM,
tsan reports false positive in such case.
It's difficult to properly detect this situation (reraise),
because in async signal processing case (when handler is called directly
from rtl_generic_sighandler) we have not yet received the reraised
signal; and it looks too fragile to intercept all ways to reraise a signal.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200742 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Check that compiler supports -fno-function-sections flag

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200746 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: add SANITIZER_INTERFACE_ATTRIBUTE to more callbacks
so that it's possible to override them from a dynamic library.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200747 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] simplify use_tls_dynamic.cc test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200748 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Replace the call to "vname" with "WRAP(vname)" in FORMAT_INTERCEPTOR_IMPL
It's incorrect to call the function by its name in the interceptor, because that means WRAP(vname) on Linux and REAL(vname) on OSX.

This patch fixes asan/lit_tests/TestCases/printf-3.c on Mac.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200749 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: update public Go interface
in preparation for https://codereview.appspot.com/55100044



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200750 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Fix printf-5.c on OSX: fix a compiler warning, avoid intercepting memcpy (which triggers the error report before printf does).



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200751 91177308-0d34-0410-b5e6-96231b3b80d8
CMake: Enable -Werror for the -fno-function-sections check

If the -fno-function-sections flag isn't recognized, the compiler
emits a warning. This isn't enough to cause the check to fail, so we
enable -Werror as well.

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