summaryrefslogtreecommitdiff
path: root/lib/fuzzer/FuzzerTracePC.cpp
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2018-08-29 18:08:34 +0000
committerMatt Morehouse <mascasa@google.com>2018-08-29 18:08:34 +0000
commit3ef5d5638fd5155876396355773b83bbbf767ca3 (patch)
tree703f732b7cd3a5d78b7a828ddffaa6a9135fac71 /lib/fuzzer/FuzzerTracePC.cpp
parent813e6b2d3004f847c095ace6939533059fa2eada (diff)
downloadcompiler-rt-3ef5d5638fd5155876396355773b83bbbf767ca3.tar.gz
[libFuzzer] Port to Windows
Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them. Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: #sanitizers, delcypher, morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@340949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/FuzzerTracePC.cpp')
-rw-r--r--lib/fuzzer/FuzzerTracePC.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/fuzzer/FuzzerTracePC.cpp b/lib/fuzzer/FuzzerTracePC.cpp
index 1aba816e8..75130840c 100644
--- a/lib/fuzzer/FuzzerTracePC.cpp
+++ b/lib/fuzzer/FuzzerTracePC.cpp
@@ -32,8 +32,7 @@ ATTRIBUTE_INTERFACE
uintptr_t __sancov_trace_pc_pcs[fuzzer::TracePC::kNumPCs];
// Used by -fsanitize-coverage=stack-depth to track stack depth
-ATTRIBUTE_INTERFACE __attribute__((tls_model("initial-exec")))
-thread_local uintptr_t __sancov_lowest_stack;
+ATTRIBUTES_INTERFACE_TLS_INITIAL_EXEC uintptr_t __sancov_lowest_stack;
namespace fuzzer {