This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [asan] a small patch to fix bogus error about global buffer overflow
- From: Diego Novillo <dnovillo at google dot com>
- To: Wei Mi <wmi at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, David Li <davidxl at google dot com>, Jakub Jelinek <jakub at redhat dot com>, Dodji Seketeli <dseketel at redhat dot com>, Andrew Pinski <pinskia at gmail dot com>
- Date: Thu, 25 Oct 2012 17:46:47 -0400
- Subject: Re: [asan] a small patch to fix bogus error about global buffer overflow
- References: <CA+4CFy4F4_EMNb8+wmMjRUaA-0Mhmy9=0C1xH-s4z-vyasbbKA@mail.gmail.com>
On Thu, Oct 25, 2012 at 5:32 PM, Wei Mi <wmi@google.com> wrote:
> Hi,
>
> A small patch to remove the bogus error reports exposed in the
> spec2000 testing. In varasm.c, asan_protected should be equivalent
> with asan_protect_global (decl) all the time, or else compiler will
> not insert redzones for some globals planned to be protected.
>
> gcc/ChangeLog:
> 2012-10-25 Wei Mi <wmi@google.com>
>
> A small fix to remove bogus error report of global buffer overflow.
No need to put this in the ChangeLog entry.
> * varasm.c: correct the condition of asan_protected being true.
Tab before '*'. Also, mention the function in varasm.c that was
changed. So, it would look something like:
* varasm.c (assemble_variable): correct the condition under
which asan_protected is true.
(yes, ChangeLog entries have silly requirements and inspire strong
feelings on both sides of the discussion. The day we get rid of them,
I will weep with joy.).
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.
Diego.