summaryrefslogtreecommitdiff
path: root/lib/asan/asan_thread.cc
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-10-18 14:50:44 +0000
committerKostya Serebryany <kcc@google.com>2013-10-18 14:50:44 +0000
commit6d95869fa900da9ddd68e15e2aa065854cfa176b (patch)
tree56c2d87779d8736d1ca4016d6974f89424f61670 /lib/asan/asan_thread.cc
parentacd18b94d494ea946599ae40425ef9ee670b0183 (diff)
[asan] reduce the size of AsanThreadContext by storing the stack trace in the stack depot
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_thread.cc')
-rw-r--r--lib/asan/asan_thread.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/asan/asan_thread.cc b/lib/asan/asan_thread.cc
index 5f75f6000..a52ab5a0a 100644
--- a/lib/asan/asan_thread.cc
+++ b/lib/asan/asan_thread.cc
@@ -19,6 +19,7 @@
#include "asan_mapping.h"
#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_common/sanitizer_placement_new.h"
+#include "sanitizer_common/sanitizer_stackdepot.h"
#include "lsan/lsan_common.h"
namespace __asan {
@@ -27,9 +28,8 @@ namespace __asan {
void AsanThreadContext::OnCreated(void *arg) {
CreateThreadContextArgs *args = static_cast<CreateThreadContextArgs*>(arg);
- if (args->stack) {
- internal_memcpy(&stack, args->stack, sizeof(stack));
- }
+ if (args->stack)
+ stack_id = StackDepotPut(args->stack->trace, args->stack->size);
thread = args->thread;
thread->set_context(this);
}