[compiler-rt] r266932 - [asan] Increase LocatePcInTrace threshold.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 15:45:25 PDT 2016
Author: eugenis
Date: Wed Apr 20 17:45:25 2016
New Revision: 266932
URL: http://llvm.org/viewvc/llvm-project?rev=266932&view=rev
Log:
[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.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc?rev=266932&r1=266931&r2=266932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc Wed Apr 20 17:45:25 2016
@@ -115,7 +115,7 @@ void BufferedStackTrace::PopStackFrames(
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;
More information about the llvm-commits
mailing list