[cfe-dev] [RFC] Linux bots should set MALLOC_PERTURB_

İsmail Dönmez ismail at donmez.ws
Tue Jul 22 04:00:43 PDT 2014


Hi,


On Tue, Jul 22, 2014 at 1:58 PM, Alexander Potapenko <glider at google.com>
wrote:

> IIUC this flag does not make glibc invalidate the _pointers_ to freed
> memory, it just overwrites the contents of the freed memory with
> garbage.
> Picking different flag values results in different garbage values,
> which may affect the behavior of buggy programs and thus help detect
> the presence of a read-after-free (not a write-after-free or
> double-free - the latter is handled by MALLOC_CHECK_).
> This flag can't be used together with ASan, because ASan replaces the
> libc allocator with its own one. ASan's use-after-free/double-free
> detection is far more reliable.
>

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?).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140722/5bc542af/attachment.html>


More information about the cfe-dev mailing list