[compiler-rt] r221520 - [sanitizer] Never remove the last frame off the stack trace.
David Blaikie
dblaikie at gmail.com
Tue Nov 11 14:46:27 PST 2014
On Fri, Nov 7, 2014 at 4:03 AM, Evgeniy Stepanov <eugeni.stepanov at gmail.com>
wrote:
> 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.
>
Test case? I'm also not quite sure what this is doing - why are we
popping/ignoring frames exactly?
>
> 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141111/beace41c/attachment.html>
More information about the llvm-commits
mailing list