summaryrefslogtreecommitdiff
path: root/libc/malloc_debug/malloc_debug.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-07-13 18:15:59 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-07-13 18:15:59 +0000
commita9713035baecf21f607ef81c8652eb344086966c (patch)
tree6f5f4676ff92d3f98e3f126cfc4ee5197d59951c /libc/malloc_debug/malloc_debug.cpp
parent2e457f5128b230fe2d9f0a581ddb4771cf83bf24 (diff)
parent97b474710225bc4853ab314c3d9ca812dc375525 (diff)
Merge "Disable malloc debug intercepts when exiting."
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
-rw-r--r--libc/malloc_debug/malloc_debug.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/libc/malloc_debug/malloc_debug.cpp b/libc/malloc_debug/malloc_debug.cpp
index 1e7086c7d..2e3a0a333 100644
--- a/libc/malloc_debug/malloc_debug.cpp
+++ b/libc/malloc_debug/malloc_debug.cpp
@@ -254,6 +254,9 @@ void debug_finalize() {
return;
}
+ // Turn off capturing allocations calls.
+ DebugDisableSet(true);
+
if (g_debug->config().options() & FREE_TRACK) {
PointerData::VerifyAllFreed();
}
@@ -263,15 +266,11 @@ void debug_finalize() {
}
if ((g_debug->config().options() & BACKTRACE) && g_debug->config().backtrace_dump_on_exit()) {
- ScopedDisableDebugCalls disable;
debug_dump_heap(android::base::StringPrintf("%s.%d.exit.txt",
g_debug->config().backtrace_dump_prefix().c_str(),
- getpid())
- .c_str());
+ getpid()).c_str());
}
- DebugDisableSet(true);
-
backtrace_shutdown();
delete g_debug;