summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2017-08-22 21:28:29 +0000
committerMatt Morehouse <mascasa@google.com>2017-08-22 21:28:29 +0000
commitb1fa8255dbedb70e57d3a55464e011b63a891cb6 (patch)
tree34287c7f406eceff3adc4947dbe3b33488810cda /compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
parent0c4c2ce0b0c4311f97396f52e7fb7f5ee5b8ce01 (diff)
downloadbcm5719-llvm-b1fa8255dbedb70e57d3a55464e011b63a891cb6.tar.gz
bcm5719-llvm-b1fa8255dbedb70e57d3a55464e011b63a891cb6.zip
[SanitizerCoverage] Optimize stack-depth instrumentation.
Summary: Use the initialexec TLS type and eliminate calls to the TLS wrapper. Fixes the sanitizer-x86_64-linux-fuzzer bot failure. Reviewers: vitalybuka, kcc Reviewed By: kcc Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D37026 llvm-svn: 311490
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerTracePC.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerTracePC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
index 985649a803b..6513b4f64b6 100644
--- a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
@@ -32,7 +32,8 @@ ATTRIBUTE_INTERFACE
uintptr_t __sancov_trace_pc_pcs[fuzzer::TracePC::kNumPCs];
// Used by -fsanitize-coverage=stack-depth to track stack depth
-ATTRIBUTE_INTERFACE thread_local uintptr_t __sancov_lowest_stack;
+ATTRIBUTE_INTERFACE __attribute__((tls_model("initial-exec")))
+thread_local uintptr_t __sancov_lowest_stack;
namespace fuzzer {
OpenPOWER on IntegriCloud