[PATCH] [sanitizer] Move GetStackTrace from ASan to sanitizer_common.

Sergey Matveev earthdok at google.com
Wed May 8 05:03:52 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_stacktrace.cc:266
@@ -265,1 +265,3 @@
 
+#if SANITIZER_LINUX || SANITIZER_MAC
+void GetStackTrace(StackTrace *stack, uptr max_s, uptr pc, uptr bp,
----------------
Kostya Serebryany wrote:
> why not in sanitizer_common/sanitizer_posix.cc ? 
This function doesn't have anything to do with POSIX standards, does it? Is it really good practice to put it in sanitizer_posix just because it has the same ifdef as that module?

================
Comment at: lib/asan/asan_stack.h:45
@@ +44,3 @@
+    } else {                                                    \
+      stack_top = stack_bottom = 0;                             \
+    }                                                           \
----------------
Kostya Serebryany wrote:
> initialize these in the declaration and drop the else clause
ok


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



More information about the llvm-commits mailing list