This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv2] Don't expand string/memory builtins if ASan is enabled.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]