[compiler-rt] r276327 - Disable thread safe statics in clang-cl, they call the CRT
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 13:03:38 PDT 2016
Author: rnk
Date: Thu Jul 21 15:03:37 2016
New Revision: 276327
URL: http://llvm.org/viewvc/llvm-project?rev=276327&view=rev
Log:
Disable thread safe statics in clang-cl, they call the CRT
Also remove the needless static that was using them.
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/asan/asan_win.cc
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=276327&r1=276326&r2=276327&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Thu Jul 21 15:03:37 2016
@@ -198,7 +198,7 @@ if(MSVC)
# VS 2015 (version 1900) added support for thread safe static initialization.
# However, ASan interceptors run before CRT initialization, which causes the
# new thread safe code to crash. Disable this feature for now.
- if (MSVC_VERSION GREATER 1899)
+ if (MSVC_VERSION GREATER 1899 OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
list(APPEND SANITIZER_COMMON_CFLAGS /Zc:threadSafeInit-)
endif()
endif()
Modified: compiler-rt/trunk/lib/asan/asan_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_win.cc?rev=276327&r1=276326&r2=276327&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_win.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_win.cc Thu Jul 21 15:03:37 2016
@@ -235,7 +235,7 @@ void AsanOnDeadlySignal(int, void *sigin
// Exception handler for dealing with shadow memory.
static LONG CALLBACK
ShadowExceptionHandler(PEXCEPTION_POINTERS exception_pointers) {
- static uptr page_size = GetPageSizeCached();
+ uptr page_size = GetPageSizeCached();
// Only handle access violations.
if (exception_pointers->ExceptionRecord->ExceptionCode !=
EXCEPTION_ACCESS_VIOLATION) {
More information about the llvm-commits
mailing list