Why not relaxing the check even more to allow for instance 128 byte
alignment which may be common?

David

On Thu, Oct 25, 2012 at 2:51 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> On Thu, Oct 25, 2012 at 05:46:47PM -0400, Diego Novillo wrote:
>> The change looks fine to me, but why not just move the alignment check
>> into asan_protect_global?  I'll defer to David or Jakub in this.
>
> asan_protect_global has
> || DECL_ALIGN_UNIT (decl) > 2 * ASAN_RED_ZONE_SIZE
> check among other things (to prevent adding guards say between
> a series of 64KB aligned vars where even inserting 32 bytes
> in between would make the section 64KB larger).
> It is just fine to protect 32-byte aligned variables (or
> 64-byte aligned ones), on the varasm.c side it was just a thinko,
> one thing was that for protected globals we want to make sure the
> alignment is at least 32-byte and another is that I wanted to avoid another
> asan_protect_global call for whether to put there padding or not.
>
>         Jakub

Reply via email to