summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-11-15 10:57:56 +0000
committerAlexey Samsonov <samsonov@google.com>2013-11-15 10:57:56 +0000
commita6e8322fb1e57df5d2d1bd4833e66853446d4879 (patch)
tree478550eace011286020ef8b7b4aa495a616f12df /compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc
parenta25cf71894052301d1dbf0ba6d250af1c5553563 (diff)
downloadbcm5719-llvm-a6e8322fb1e57df5d2d1bd4833e66853446d4879.tar.gz
bcm5719-llvm-a6e8322fb1e57df5d2d1bd4833e66853446d4879.zip
[Sanitizer] Make slow unwinder on Linux more robust
llvm-svn: 194805
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc
index 62cb12d8da6..70ce26bde0d 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc
@@ -158,12 +158,11 @@ static bool MatchPc(uptr cur_pc, uptr trace_pc, uptr threshold) {
return cur_pc - trace_pc <= threshold || trace_pc - cur_pc <= threshold;
}
-uptr
-StackTrace::LocatePcInTrace(uptr pc, uptr max_pc_depth) {
+uptr StackTrace::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 = 64;
- for (uptr i = 0; i < max_pc_depth && i < size; ++i) {
+ const int kPcThreshold = 96;
+ for (uptr i = 0; i < size; ++i) {
if (MatchPc(pc, trace[i], kPcThreshold))
return i;
}
OpenPOWER on IntegriCloud