summaryrefslogtreecommitdiff
path: root/lib/asan/asan_rtl.cc
diff options
context:
space:
mode:
authorWalter Lee <waltl@google.com>2017-11-21 01:01:32 +0000
committerWalter Lee <waltl@google.com>2017-11-21 01:01:32 +0000
commit9ccd9976910686c34baf18493c0796458e826847 (patch)
tree742914e72fe37a4ffd574070d001f7c5fc0229f6 /lib/asan/asan_rtl.cc
parent425a276f1ad02b7e08a41d667475838e848b5a53 (diff)
[sanitizers] Add init function to set alignment of low level allocator
ASan requires that the min alignment be at least the shadow granularity, so add an init function to do that. Differential Revision: https://reviews.llvm.org/D39473 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_rtl.cc')
-rw-r--r--lib/asan/asan_rtl.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/asan/asan_rtl.cc b/lib/asan/asan_rtl.cc
index 27e4bd842..21fd0e240 100644
--- a/lib/asan/asan_rtl.cc
+++ b/lib/asan/asan_rtl.cc
@@ -407,6 +407,7 @@ static void AsanInitInternal() {
MaybeReexec();
// Setup internal allocator callback.
+ SetLowLevelAllocateMinAlignment(SHADOW_GRANULARITY);
SetLowLevelAllocateCallback(OnLowLevelAllocate);
InitializeAsanInterceptors();