diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-04-20 22:45:25 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-04-20 22:45:25 +0000 |
commit | f021a7a011573764e31bbe00f9283e5b09b74362 (patch) | |
tree | b05b15f4739ae1c2e2dd5fd57a41afeb24751f62 /lib | |
parent | b69978df2c04e4e06e3ed7ed7c0c1f471738b365 (diff) |
[asan] Increase LocatePcInTrace threshold.
Not sure what changed, but on my machine this is literally one byte
short. Only happens when malloc_context_size <= 2 due to the special
case in GET_STACK_TRACE definition (see asan_stack.h):
StackTrace::GetCurrentPc() on the right (context size > 2) branch
returns the address that is 200-something bytes from the return
address it is later matched to, while the same call on the left
branch is 321 bytes away from it.
This fixes the double-free test on my machine.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sanitizer_common/sanitizer_stacktrace.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_stacktrace.cc b/lib/sanitizer_common/sanitizer_stacktrace.cc index 4d95dc9dc..bf5456fc2 100644 --- a/lib/sanitizer_common/sanitizer_stacktrace.cc +++ b/lib/sanitizer_common/sanitizer_stacktrace.cc @@ -115,7 +115,7 @@ void BufferedStackTrace::PopStackFrames(uptr count) { uptr BufferedStackTrace::LocatePcInTrace(uptr pc) { // Use threshold to find PC in stack trace, as PC we want to unwind from may // slightly differ from return address in the actual unwinded stack trace. - const int kPcThreshold = 320; + const int kPcThreshold = 350; for (uptr i = 0; i < size; ++i) { if (MatchPc(pc, trace[i], kPcThreshold)) return i; |