summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-08-22 01:50:00 +0000
committerKostya Serebryany <kcc@google.com>2017-08-22 01:50:00 +0000
commit33fb36c3537d79ec9751e73a31445814d709b1e4 (patch)
treef5df136ca3ce95b9daa4a3987a62b6715bcff87c /compiler-rt/lib/fuzzer
parentf65cf64fa2d3f7804020b83719ad47969006ff2b (diff)
downloadbcm5719-llvm-33fb36c3537d79ec9751e73a31445814d709b1e4.tar.gz
bcm5719-llvm-33fb36c3537d79ec9751e73a31445814d709b1e4.zip
[libFuzzer] fix the stack-depth initialization, add a lit test for DeepRecursionTest.cpp
llvm-svn: 311421
Diffstat (limited to 'compiler-rt/lib/fuzzer')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerTracePC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
index ebd33d3ec88..985649a803b 100644
--- a/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp
@@ -343,8 +343,10 @@ void TracePC::ClearInlineCounters() {
}
}
+ATTRIBUTE_NO_SANITIZE_ALL
void TracePC::RecordInitialStack() {
- InitialStack = __sancov_lowest_stack;
+ int stack;
+ __sancov_lowest_stack = InitialStack = reinterpret_cast<uintptr_t>(&stack);
}
uintptr_t TracePC::GetMaxStackOffset() const {
OpenPOWER on IntegriCloud