This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv2] Don't expand string/memory builtins if ASan is enabled.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Maxim Ostapenko <m dot ostapenko at partner dot samsung dot com>
- Cc: Yury Gribov <y dot gribov at samsung dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Slava Garbuzov <v dot garbuzov at samsung dot com>, Maxim Ostapenko <chefmax7 at gmail dot com>
- Date: Tue, 28 Oct 2014 10:31:30 +0100
- Subject: Re: [PATCHv2] Don't expand string/memory builtins if ASan is enabled.
- Authentication-results: sourceware.org; auth=none
- References: <5441008A dot 2010706 at partner dot samsung dot com> <54410170 dot 9030100 at partner dot samsung dot com> <20141017122420 dot GR10376 at tucnak dot redhat dot com> <5441132D dot 8000500 at samsung dot com> <20141017130340 dot GW10376 at tucnak dot redhat dot com> <54465EF3 dot 5060601 at partner dot samsung dot com> <5448BBC8 dot 9060807 at samsung dot com> <20141027143458 dot GW10376 at tucnak dot redhat dot com> <544F5205 dot 7090903 at partner dot samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Oct 28, 2014 at 12:21:25PM +0400, Maxim Ostapenko wrote:
> 2014-10-28 Max Ostapenko <m.ostapenko@partner.samsung.com>
>
> * asan.h (is_asan_intercepted): New function.
I'd call it asan_intercepted_p instead.
Can you please check if:
void foo (char *p)
{
volatile int zero = 0;
memcpy (p, "abc", zero);
p[0] = 'd';
}
does not remove instrumentation from p[0] store (i.e. the builtin store
length might (and this case actually is) zero, so no checking is done for
any byte.
Ditto for explicit s/zero)/0)/, and for s/zero)/2)/ check if the
instrumentation is removed.
If that works properly, the patch is ok with the routine name change. Thanks.
Jakub