Re: [PATCH] Inline asm asan instrumentation

2014-05-29 Thread Yury Gribov
The fact that some region appears in "m" doesn't mean the inline asm actually accesses it, it could not touch it at all, or only some part of it. Do we have precise semantics of "m" written somewhere? My understanding was that even though asm may not touch buffer at all (like e.g. in our tests)

RE: [PATCH] Inline asm asan instrumentation

2014-05-29 Thread Marat Zakirov
antin Serebryany'; 'Viacheslav Garbuzov'; 'Yuri Gribov'; 'Marat Zakirov' Subject: Re: [PATCH] Inline asm asan instrumentation On Wed, May 28, 2014 at 05:33:44PM +0400, Marat Zakirov wrote: > Here's a patch for optional Asan instrumentation of inline assembly. &g

RE: [PATCH] Inline asm asan instrumentation

2014-05-29 Thread Marat Zakirov
ge- From: Evgeniy Stepanov [mailto:eugeni.stepa...@gmail.com] Sent: Thursday, May 29, 2014 1:58 PM To: Konstantin Serebryany Cc: Marat Zakirov; GCC Patches; Konstantin Serebryany; Jakub Jelinek; Viacheslav Garbuzov; Yuri Gribov; Marat Zakirov Subject: Re: [PATCH] Inline asm asan instrumentatio

Re: [PATCH] Inline asm asan instrumentation

2014-05-29 Thread Jakub Jelinek
On Wed, May 28, 2014 at 05:33:44PM +0400, Marat Zakirov wrote: > Here's a patch for optional Asan instrumentation of inline assembly. > > This version scans gimple for GIMPLE_ASMs and performs usual instrumentation > of arguments with memory constraints ("m", "o", etc.) with fixed size. That does

Re: [PATCH] Inline asm asan instrumentation

2014-05-29 Thread Evgeniy Stepanov
Cool, we don't have this in LLVM-ASan, but we have plans to instrument inline asm soon (not just constraints). asm-struct-1.c test looks like a false positive though - the code does not access any invalid memory, it only does a harmless pointer cast. On Wed, May 28, 2014 at 10:36 PM, Konstantin

Re: [PATCH] Inline asm asan instrumentation

2014-05-28 Thread Konstantin Serebryany
On Wed, May 28, 2014 at 5:33 PM, Marat Zakirov wrote: > Hi all, > > Here's a patch for optional Asan instrumentation of inline assembly. > > This version scans gimple for GIMPLE_ASMs and performs usual instrumentation > of arguments with memory constraints ("m", "o", etc.) with fixed size. > > Ins