http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59061
--- Comment #31 from Sergey Matveev <earthdok at google dot com> --- (In reply to Kostya Serebryany from comment #30) > 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? It can cause a false negative if there's a stale pointer outside of those 4k. But in practice 4k ought to be enough for anybody. I think standalone LSan should support the max_alloc_fill_size flag. I'll also change it to use real memset.