From 2edac86cdb8410260e6581db14275247c22855b3 Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Tue, 29 Aug 2017 21:15:33 +0000 Subject: [PATCH] Re-enable stack depth instrumentation on Windows. Specified tls_model attribute properly. Should compile on Windows now. llvm-svn: 312037 --- clang/lib/Driver/SanitizerArgs.cpp | 4 ++-- compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp index 7dd2046378f6..a2a1373c8d84 100644 --- a/clang/lib/Driver/SanitizerArgs.cpp +++ b/clang/lib/Driver/SanitizerArgs.cpp @@ -315,8 +315,8 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, if (Add & FuzzerNoLink) { CoverageFeatures |= CoverageTracePCGuard | CoverageIndirCall | CoverageTraceCmp | CoveragePCTable; - // Due to TLS differences, stack depth tracking is disabled on Mac/Win. - if (!TC.getTriple().isOSDarwin() && !TC.getTriple().isOSWindows()) + // Due to TLS differences, stack depth tracking is disabled on Mac. + if (!TC.getTriple().isOSDarwin()) CoverageFeatures |= CoverageStackDepth; } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h index 28687c66b7e6..c7b401d4f10d 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h @@ -36,11 +36,11 @@ #endif // Mac handles TLS differently -#if SANITIZER_MAC || SANITIZER_WINDOWS +#if SANITIZER_MAC # define SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE #else # define SANITIZER_TLS_INITIAL_EXEC_ATTRIBUTE \ - __attribute((tls_model("initial-exec"))) thread_local + __attribute__((tls_model("initial-exec"))) thread_local #endif //--------------------------- WEAK FUNCTIONS ---------------------------------//