On Thu, Oct 23, 2014 at 12:26:48PM +0400, Yury Gribov wrote: > On 10/21/2014 05:26 PM, Maxim Ostapenko wrote: > >Hi, > > > >this is the second version of the patch. Here the major changes from the > >previous one: > > [snip] > > > 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?
I agree. 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[0] = 'd'; you don't really have to instrument p[0] store, because supposedly memcpy call has already verified p[0] through p[2] is writable. Jakub