[GWP-ASan] Update alignment on Android.
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Wed, 12 Feb 2020 23:24:55 +0000 (15:24 -0800)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Wed, 12 Feb 2020 23:24:58 +0000 (15:24 -0800)
commit5f2a74c87abc4ed926e93e75d1c3178723a47322
tree3bf72799895a4896a6894d59b1138839e68742d7
parent369d086d784e0c8cc7add9823f319e95f95dbd81
[GWP-ASan] Update alignment on Android.

Summary:
Android has different alignment requirements. You can read more about
them here
(https://cs.android.com/android/platform/superproject/+/master:bionic/tests/malloc_test.cpp;l=808),
but the general gist is that for malloc(x <= 8), we do malloc(8), and
for everything else, we do 16-byte alignment.

Reviewers: eugenis, morehouse, cferris

Reviewed By: eugenis, morehouse

Subscribers: #sanitizers, llvm-commits, pcc

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D74364
compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
compiler-rt/lib/gwp_asan/guarded_pool_allocator.h
compiler-rt/lib/gwp_asan/options.inc
compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp
compiler-rt/lib/gwp_asan/tests/alignment.cpp
compiler-rt/lib/gwp_asan/utilities.h