diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-12-12 20:07:35 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-12-12 20:07:35 +0000 |
commit | 615a96827869f87d4e163d2c3e6786ca5cdb18ff (patch) | |
tree | fc15017b0af4393b5905f0ec0215fb2bb1b96e86 /lib/lsan/lsan_allocator.cc | |
parent | 42bcd70673d86f6bb07affff1b42b4647efbe99d (diff) | |
download | compiler-rt-615a96827869f87d4e163d2c3e6786ca5cdb18ff.tar.gz |
[Sanitizer] Introduce Allocator::may_return_null bool flag.
Summary:
Turn "allocator_may_return_null" common flag into an
Allocator::may_return_null bool flag. We want to make sure
that common flags are immutable after initialization. There
are cases when we want to change this flag in the allocator
at runtime: e.g. in unit tests and during ASan activation
on Android.
Test Plan: regression test suite, real-life applications
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6623
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan_allocator.cc')
-rw-r--r-- | lib/lsan/lsan_allocator.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lsan/lsan_allocator.cc b/lib/lsan/lsan_allocator.cc index 8be2a2ad9..4d0fbabfa 100644 --- a/lib/lsan/lsan_allocator.cc +++ b/lib/lsan/lsan_allocator.cc @@ -47,7 +47,7 @@ static Allocator allocator; static THREADLOCAL AllocatorCache cache; void InitializeAllocator() { - allocator.Init(); + allocator.Init(common_flags()->allocator_may_return_null); } void AllocatorThreadFinish() { |