http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59061

--- Comment #30 from Kostya Serebryany <kcc at gcc dot gnu.org> ---
(In reply to Joost VandeVondele from comment #29)
> I've tried -fsanitize=leak and it works well, thanks! 
> 
> Concerning the speed, I'm still seeing about 20% slowdown (again, this is
> acceptable from my point of view). Under oprofile, the 
> __sanitizer::internal_memset is near the top (see below), it this expected
> for -fsanitize=leak ?
> 

Good catch. 
That's what I meant when I said that we don't test lsan outside of asan. 

lsan's allocator clears all memory using internal_memset, which is damn slow.
(sets on byte at a time)

asan's allocator doesn't do that (it sets first 4K bytes of allocated region
with garbage using the REAL fast memset)

I think the right solution is to finally implement *fast* internal_memset. 
We'll do that. 

Sergey, can this difference between asan and lsan allocators cause 
false negatives/positives in lsan?

Reply via email to