This is the mail archive of the
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: Yury Gribov <y dot gribov at samsung dot com>
- Cc: Maxim Ostapenko <m dot ostapenko at partner dot 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: Mon, 27 Oct 2014 15:34:58 +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>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 23, 2014 at 12:26:48PM +0400, Yury Gribov wrote:
> On 10/21/2014 05:26 PM, Maxim Ostapenko wrote:
> >this is the second version of the patch. Here the major changes from the
> >previous one:
> > case BUILT_IN_BCMP:
> >+ *intercepted_p = false;
> The code which identifies interceptors seems to be duplicated in
> expand_builtin. What about factoring this out to some is_asan_intercepted()
> in asan.h?
BTW, when you handle a builtin, but set *intercepted_p to false, is the
point just that you don't instrument e.g. scalar accesses to that memory
region afterwards? I mean:
memcpy (p, "abc", 3);
p = 'd';
you don't really have to instrument p store, because supposedly memcpy
call has already verified p through p is writable.