Commit graph

4 commits

Author SHA1 Message Date
Colin Cross
cecd64012d Silently ignore duplicate heap entries
Vendor blobs on ryu mprotect heap pages, causing a single chunk mapping
to appear as multiple mappings.  The heap iterator has to expand the
requested range to cover the beginning of the chunk to find the chunk
metadata, which will lead to duplicate identical allocations being
reported from iterating over each of the split mappings.  Silently
ignore identical allocations, and only warn on non-identical allocations
that overlap.

Bug: 28269332
Change-Id: Ied2ab9270f65d00a887c7ce1a93fbf0617d69be0
2016-04-28 16:20:40 -07:00
Colin Cross
ba5d9ff6d9 Handle segfaults while walking native heap
Vendor blobs on ryu mprotect heap pages, causing segfaults when dumping
unreachable memory.  Handle segfaults within HeapWalker by mapping a
zero page over any unreadable pages.  HeapWalker runs in the forked
process, so the mapping will not affect the original process.

Bug: 28269332
Change-Id: I16245af722123f2ad467cbc6f245a70666c55544
2016-04-28 16:20:40 -07:00
Colin Cross
8e8f34c558 Fold leaks that are referenced by other leaks
Find leaks that have no references at all, or are only referenced by
other leaks in the same strongly connected component, and hide all
referenced leaks.

Bug: 27208635
Change-Id: Ifbfd14e24e2ba0f8af7c1b887e57f34362720f2d
2016-03-04 16:39:59 -08:00
Colin Cross
7add50d820 imprecise mark and sweep native memory leak detector
libmemunreachable uses an imprecise mark and sweep pass over all memory
allocated by jemalloc in order to find unreachable allocations.

Bug: 27208635
Change-Id: Ia70bbf31f5b40ff71dab28cfd6cd06c5ef01a2d4
(cherry picked from commit bcb4ed3eaa)
2016-02-19 00:49:36 -08:00