<div dir="ltr">Hi,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 22, 2014 at 1:58 PM, Alexander Potapenko <span dir="ltr"><<a href="mailto:glider@google.com" target="_blank">glider@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">IIUC this flag does not make glibc invalidate the _pointers_ to freed<br>
memory, it just overwrites the contents of the freed memory with<br>
garbage.<br>
Picking different flag values results in different garbage values,<br>
which may affect the behavior of buggy programs and thus help detect<br>
the presence of a read-after-free (not a write-after-free or<br>
double-free - the latter is handled by MALLOC_CHECK_).<br>
This flag can't be used together with ASan, because ASan replaces the<br>
libc allocator with its own one. ASan's use-after-free/double-free<br>
detection is far more reliable.<br></blockquote><div><br></div><div>Thanks for your reply! I know Asan and MALLOC_PERTURB_ is now compatible but they uncover similar bugs with latter being really lightweight and less-capable. But still as in PR20228 it uncovers bugs which Asan didn't find (I guess?).</div>

<div> </div></div></div></div>