summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2019-11-06 13:15:00 -0800
committerJosh Gao <jmgao@google.com>2020-01-27 16:19:25 -0800
commitb7eccd4b1577c101132e52d4a5313d5322dcae2d (patch)
treeb46538e0c49317ebf229a9badcad522d44f0d469 /libc/malloc_hooks/malloc_hooks.cpp
parent15b4f278535d919c032ac8615fbd956daffb870e (diff)
Add a tool to track down fd leaks.
Add a hook that's called upon file descriptor creation to libc, and a library that uses it to capture backtraces for file descriptor creation, to make it easier to hunt down file descriptor leaks. Currently, this doesn't capture all of the ways of creating a file descriptor, but completeness isn't required for this to be useful as long as leaked file descriptors are created with a function that is tracked. The primary unhandled case is binder, which receives file descriptors as a payload in a not-trivially-parsable byte blob, but there's a chance that the leak we're currently trying to track down isn't of a file descriptor received over binder, so leave that for later. Bug: http://b/140703823 Test: manual Change-Id: I308a14c2e234cdba4207157b634ab6b8bc539dd9
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions