OSDN Git Service

malloc_debug: iterate: use usable_size
authorColin Cross <ccross@android.com>
Thu, 10 Mar 2016 00:33:44 +0000 (16:33 -0800)
committerColin Cross <ccross@android.com>
Thu, 10 Mar 2016 00:33:44 +0000 (16:33 -0800)
commitb23c6606d2326f8835fc7fc35b23ff7ee5a48f48
tree73a489c6a0c578e1ab44a8eeec781ecace382387
parent060d6bbe6f9c9e4a55c5ebb2724c30ec24279e8a
malloc_debug: iterate: use usable_size

malloc_iterate with malloc debug enabled was returning allocation sizes
using the requested size instead of usable size.  If anything wrote
pointers above the requested size but below the usable size, those
pointers would be invisible to libmemunreachable and referenced
allocations could be reported as a leak.

Bug: 27107100
Change-Id: I6b19fd631f68ce93b3aee408cc3d296ec457bd01
libc/malloc_debug/malloc_debug.cpp