From: Maxim Ostapenko Date: Mon, 30 Oct 2017 11:09:44 +0000 (+0000) Subject: asan.c (asan_finish_file): Align asan globals array by shadow granularity. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa650b641022754c1ee6a58130fe2984d06d9657;p=gcc.git asan.c (asan_finish_file): Align asan globals array by shadow granularity. 2017-10-30 Maxim Ostapenko * asan.c (asan_finish_file): Align asan globals array by shadow granularity. From-SVN: r254214 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 680033348f1..3e38a8ecc6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-30 Maxim Ostapenko + + * asan.c (asan_finish_file): Align asan globals array by shadow + granularity. + 2017-10-30 Jakub Jelinek PR middle-end/22141 diff --git a/gcc/asan.c b/gcc/asan.c index 302ac4fcdec..d5128aaad37 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -2942,6 +2942,9 @@ asan_finish_file (void) TREE_CONSTANT (ctor) = 1; TREE_STATIC (ctor) = 1; DECL_INITIAL (var) = ctor; + SET_DECL_ALIGN (var, MAX (DECL_ALIGN (var), + ASAN_SHADOW_GRANULARITY * BITS_PER_UNIT)); + varpool_node::finalize_decl (var); tree fn = builtin_decl_implicit (BUILT_IN_ASAN_REGISTER_GLOBALS);