diff options
author | Kostya Serebryany <kcc@google.com> | 2017-08-22 01:50:00 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2017-08-22 01:50:00 +0000 |
commit | 63b65394978b2a5e37988e275e07127cc558c11b (patch) | |
tree | c6315e65d2e59385e309be9d1d1ac7bdd45eb0ac /lib/fuzzer | |
parent | 190938f453f63c379a3c07c0140a69d87ff812a8 (diff) |
[libFuzzer] fix the stack-depth initialization, add a lit test for DeepRecursionTest.cpp
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer')
-rw-r--r-- | lib/fuzzer/FuzzerTracePC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fuzzer/FuzzerTracePC.cpp b/lib/fuzzer/FuzzerTracePC.cpp index ebd33d3ec..985649a80 100644 --- a/lib/fuzzer/FuzzerTracePC.cpp +++ b/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 { |