[hwasan] Fix allocator alignment.
authorEvgenii Stepanov <eugenis@google.com>
Fri, 8 May 2020 23:32:33 +0000 (16:32 -0700)
committerEvgenii Stepanov <eugenis@google.com>
Mon, 11 May 2020 22:45:42 +0000 (15:45 -0700)
commit67b950be6d48eb4f8d9d4c450f590b64e769df5d
treed01a1d2627a98336f4457931ab60ceba3bf74c08
parent756d6959d7ac95969cc0127765bdcbee3804547c
[hwasan] Fix allocator alignment.

Summary:
Fix hwasan allocator not respecting the requested alignment when it is
higher than a page, but still within primary (i.e. [2048, 65536]).

Reviewers: pcc, hctim, cryptoad

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D79656
compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h
compiler-rt/lib/sanitizer_common/sanitizer_common.h
compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp
compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cpp
compiler-rt/test/hwasan/TestCases/malloc-align.c [new file with mode: 0644]