aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-10-26 03:35:14 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-10-26 03:35:14 +0000
commit9c859270123679f6d4f708dbabf57dc052cbbf59 (patch)
tree97654b810e077a643a19c636ed7fb1ba3de459f3 /compiler-rt/lib/lsan/lsan.h
parent[clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh (diff)
downloadllvm-project-9c859270123679f6d4f708dbabf57dc052cbbf59.tar.gz
llvm-project-9c859270123679f6d4f708dbabf57dc052cbbf59.tar.bz2
llvm-project-9c859270123679f6d4f708dbabf57dc052cbbf59.zip
[Sanitizer] Make StackTrace a lightweight reference to array of PCs, and
introduce a BufferedStackTrace class, which owns this array. Summary: This change splits __sanitizer::StackTrace class into a lightweight __sanitizer::StackTrace, which doesn't own array of PCs, and BufferedStackTrace, which owns it. This would allow us to simplify the interface of StackDepot, and eventually merge __sanitizer::StackTrace with __tsan::StackTrace. Test Plan: regression test suite. Reviewers: kcc, dvyukov Reviewed By: dvyukov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5985 llvm-svn: 220635
Diffstat (limited to 'compiler-rt/lib/lsan/lsan.h')
-rw-r--r--compiler-rt/lib/lsan/lsan.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler-rt/lib/lsan/lsan.h b/compiler-rt/lib/lsan/lsan.h
index d9dd63ab8c57..53783cdc9c7d 100644
--- a/compiler-rt/lib/lsan/lsan.h
+++ b/compiler-rt/lib/lsan/lsan.h
@@ -15,17 +15,17 @@
#include "sanitizer_common/sanitizer_flags.h"
#include "sanitizer_common/sanitizer_stacktrace.h"
-#define GET_STACK_TRACE(max_size, fast) \
- StackTrace stack; \
- { \
- uptr stack_top = 0, stack_bottom = 0; \
- ThreadContext *t; \
- if (fast && (t = CurrentThreadContext())) { \
- stack_top = t->stack_end(); \
- stack_bottom = t->stack_begin(); \
- } \
- stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \
- /* context */ 0, stack_top, stack_bottom, fast); \
+#define GET_STACK_TRACE(max_size, fast) \
+ BufferedStackTrace stack; \
+ { \
+ uptr stack_top = 0, stack_bottom = 0; \
+ ThreadContext *t; \
+ if (fast && (t = CurrentThreadContext())) { \
+ stack_top = t->stack_end(); \
+ stack_bottom = t->stack_begin(); \
+ } \
+ stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \
+ /* context */ 0, stack_top, stack_bottom, fast); \
}
#define GET_STACK_TRACE_FATAL \