[asan] Fix size/alignment issues with non-default shadow scale
authorWalter Lee <waltl@google.com>
Thu, 16 Nov 2017 12:57:19 +0000 (12:57 +0000)
committerWalter Lee <waltl@google.com>
Thu, 16 Nov 2017 12:57:19 +0000 (12:57 +0000)
commit2a2b69e9c788a35fb93971350c805fc499918c5e
treee0fa5f08de95a250797667e5ca502940821e4eaa
parent661a2c197053d04ce97558ff642336150d986c85
[asan] Fix size/alignment issues with non-default shadow scale

Fix a couple places where the minimum alignment/size should be a
function of the shadow granularity:
- alignment of AllGlobals
- the minimum left redzone size on the stack

Added a test to verify that the metadata_array is properly aligned
for shadow scale of 5, to be enabled when we add build support
for testing shadow scale of 5.

Differential Revision: https://reviews.llvm.org/D39470

llvm-svn: 318395
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll