summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2018-08-28 18:34:32 +0000
committerMatt Morehouse <mascasa@google.com>2018-08-28 18:34:32 +0000
commitc6fff3b6f5b937b97a427e5e52ece058ce71b55b (patch)
treedd1da3133d27cd42b0900e0e5e4144776cc1d00b /compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
parentde6c421cc81f935b74f771638d674c745118ef8b (diff)
downloadbcm5719-llvm-c6fff3b6f5b937b97a427e5e52ece058ce71b55b.tar.gz
bcm5719-llvm-c6fff3b6f5b937b97a427e5e52ece058ce71b55b.zip
[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. Patch By: metzman Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 llvm-svn: 340860
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerTracePC.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerTracePC.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
index 1aba816e832..75130840ce0 100644
--- a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
+++ b/compiler-rt/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 {
OpenPOWER on IntegriCloud