[PATCH] Share some stack walking code between Windows and Linux

Timur Iskhodzhanov timurrrr at google.com
Sat Nov 9 05:52:14 PST 2013



================
Comment at: lib/sanitizer_common/sanitizer_win.cc:385
@@ +384,3 @@
+                               (void**)trace, 0);
+  uptr pc_location = LocatePcInTrace(pc);
+  PopStackFrames(pc_location);
----------------
Alexey Samsonov wrote:
> Can you specify pc_threshold and max_pc_depth here, instead of using default arg values? I also wonder if 64 for pc_threshold will also solve the problem with malloc/free stacks indicated by FIXME.
Ah, so actually removed the comment by mistake. Bringing it back!

Sure, I'll try tweaking the params, just wanted to do this as separate CL, most likely with a test update.

================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:161
@@ -164,3 +160,3 @@
     return;
-  UnwindTraceArg arg = {this, Min(max_depth + 1, kStackTraceMax)};
+  UnwindTraceArg arg = {this, Min(max_depth + 2, kStackTraceMax)};
   _Unwind_Backtrace(Unwind_Trace, &arg);
----------------
Hm, not sure why I've replaced 1 with 2. Reverting this part of the patch...


http://llvm-reviews.chandlerc.com/D2126



More information about the llvm-commits mailing list