[compiler-rt] r221520 - [sanitizer] Never remove the last frame off the stack trace.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Nov 7 04:03:07 PST 2014
Author: eugenis
Date: Fri Nov 7 06:03:07 2014
New Revision: 221520
URL: http://llvm.org/viewvc/llvm-project?rev=221520&view=rev
Log:
[sanitizer] Never remove the last frame off the stack trace.
It can only make it worse.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc?rev=221520&r1=221519&r2=221520&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc Fri Nov 7 06:03:07 2014
@@ -116,7 +116,7 @@ void BufferedStackTrace::SlowUnwindStack
// We need to pop a few frames so that pc is on top.
uptr to_pop = LocatePcInTrace(pc);
// trace_buffer[0] belongs to the current function so we always pop it.
- if (to_pop == 0)
+ if (to_pop == 0 && size > 1)
to_pop = 1;
PopStackFrames(to_pop);
trace_buffer[0] = pc;
More information about the llvm-commits
mailing list