[compiler-rt] r311490 - [SanitizerCoverage] Optimize stack-depth instrumentation.
Matt Morehouse via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 14:28:29 PDT 2017
Author: morehouse
Date: Tue Aug 22 14:28:29 2017
New Revision: 311490
URL: http://llvm.org/viewvc/llvm-project?rev=311490&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp
compiler-rt/trunk/test/fuzzer/deep-recursion.test
Modified: compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp?rev=311490&r1=311489&r2=311490&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp (original)
+++ compiler-rt/trunk/lib/fuzzer/FuzzerTracePC.cpp Tue Aug 22 14:28:29 2017
@@ -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 {
Modified: compiler-rt/trunk/test/fuzzer/deep-recursion.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/fuzzer/deep-recursion.test?rev=311490&r1=311489&r2=311490&view=diff
==============================================================================
--- compiler-rt/trunk/test/fuzzer/deep-recursion.test (original)
+++ compiler-rt/trunk/test/fuzzer/deep-recursion.test Tue Aug 22 14:28:29 2017
@@ -1,5 +1,4 @@
# Test that we can find a stack overflow
-RUN: echo DISABLED
-DISABLED: %cpp_compiler -fsanitize-coverage=stack-depth %S/DeepRecursionTest.cpp -o %t
-DISABLED: not %t -seed=1 -runs=100000000 2>&1 | FileCheck %s
-DISABLED: ERROR: libFuzzer: deadly signal
+RUN: %cpp_compiler -fsanitize-coverage=stack-depth %S/DeepRecursionTest.cpp -o %t
+RUN: not %t -seed=1 -runs=100000000 2>&1 | FileCheck %s
+CHECK: ERROR: libFuzzer: deadly signal
More information about the llvm-commits
mailing list