[PATCH] [ASan] Speed up stack trace unwinding for stacks of size 2.

Yury Gribov tetra2005 at gmail.com
Tue Mar 4 05:32:27 PST 2014


  More or less what I was thinking about. Minor comments inlined.


================
Comment at: lib/asan/asan_stack.h:63
@@ +62,3 @@
+    }                                                                          \
+    if (max_size > 1)                                                          \
+      stack.trace[1] = GET_CALLER_PC();                                        \
----------------
Perhaps move this into previous if?

================
Comment at: test/asan/TestCases/malloc_context_size.cc:6
@@ -5,2 +5,3 @@
 // RUN: ASAN_OPTIONS=malloc_context_size=1:fast_unwind_on_malloc=1 not %t 2>&1 | FileCheck %s --check-prefix=CHECK-%os
+// RUN: ASAN_OPTIONS=malloc_context_size=2 not %t 2>&1 | FileCheck %s --check-prefix=TWO
 
----------------
Note that all tests with malloc_context_size <= 2 will be using fast path now i.e. normal unwinder may be lacking tests.


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

COMMIT
  http://llvm-reviews.chandlerc.com/rL202845



More information about the llvm-commits mailing list