[ASan] Allow to atomically modify malloc_context_size at runtime.
authorAlexey Samsonov <vonosmas@gmail.com>
Tue, 16 Dec 2014 01:23:03 +0000 (01:23 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Tue, 16 Dec 2014 01:23:03 +0000 (01:23 +0000)
commitbba821b5b143625eaad566ed524d5b40ed732ba9
tree55f5c0564108b9b0b89c0c778e60ed5f3861dea6
parentab534366fe39b145748d5e004d58fdb0cdabfe77
[ASan] Allow to atomically modify malloc_context_size at runtime.

Summary:
Introduce __asan::malloc_context_size atomic that is used to determine
required malloc/free stack trace size. It is initialized with
common_flags()->malloc_context_size flag, but can later be overwritten
at runtime (e.g. when ASan is activated / deactivated).

Test Plan: regression test suite

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6645

llvm-svn: 224305
compiler-rt/lib/asan/asan_activation.cc
compiler-rt/lib/asan/asan_rtl.cc
compiler-rt/lib/asan/asan_stack.cc
compiler-rt/lib/asan/asan_stack.h
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc