[compiler-rt] r201212 - [Sanitizer] Reduce stack frame size of SlowUnwindStackWithContext

Alexey Samsonov samsonov at google.com
Tue Feb 11 23:24:11 PST 2014


Author: samsonov
Date: Wed Feb 12 01:24:11 2014
New Revision: 201212

URL: http://llvm.org/viewvc/llvm-project?rev=201212&view=rev
Log:
[Sanitizer] Reduce stack frame size of SlowUnwindStackWithContext

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=201212&r1=201211&r2=201212&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Wed Feb 12 01:24:11 2014
@@ -249,11 +249,11 @@ void StackTrace::SlowUnwindStackWithCont
 
   void *map = acquire_my_map_info_list();
   CHECK(map);
-  backtrace_frame_t frames[kStackTraceMax];
+  InternalScopedBuffer<backtrace_frame_t> frames(kStackTraceMax);
   // siginfo argument appears to be unused.
-  sptr res =
-      unwind_backtrace_signal_arch(/* siginfo */ NULL, context, map, frames,
-                                   /* ignore_depth */ 0, max_depth);
+  sptr res = unwind_backtrace_signal_arch(/* siginfo */ NULL, context, map,
+                                          frames.data(),
+                                          /* ignore_depth */ 0, max_depth);
   release_my_map_info_list(map);
   if (res < 0) return;
   CHECK((uptr)res <= kStackTraceMax);





More information about the llvm-commits mailing list