aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-05-29 17:39:12 -0700
committerChristopher Ferris <cferris@google.com>2018-05-30 02:06:15 +0000
commit03cb53a17d47e1a4777672e4ea76afa8e23f1d41 (patch)
tree3be7f8888d3c72db350b01b70686ad3efa82c75c
parentdac8340c437c9dafcc7e621f9dafa6a2239c3ca9 (diff)
downloadbionic-pie-dev.tar.gz
DO NOT MERGE: Move to version v1.1.pie-dev
The new malloc debug sets the num allocations field to non-zero. Unfortunately, an old version of malloc debug incorrectly set this field. In order to differentiate between the broken output, increment the version number. Bug: 74361929 Test: Ran unit tests. Change-Id: Ia88300e324fe9d46aae0c93079ee926e088e675e
-rw-r--r--libc/malloc_debug/malloc_debug.cpp2
-rw-r--r--libc/malloc_debug/tests/malloc_debug_unit_tests.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/libc/malloc_debug/malloc_debug.cpp b/libc/malloc_debug/malloc_debug.cpp
index 6f841cab5..e83f73c32 100644
--- a/libc/malloc_debug/malloc_debug.cpp
+++ b/libc/malloc_debug/malloc_debug.cpp
@@ -819,7 +819,7 @@ bool debug_dump_heap(const char* file_name) {
return false;
}
- fprintf(fp, "Android Native Heap Dump v1.0\n\n");
+ fprintf(fp, "Android Native Heap Dump v1.1\n\n");
PointerData::DumpLiveToFile(fp);
diff --git a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
index 1504d06dd..f62234b36 100644
--- a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
+++ b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
@@ -1311,7 +1311,7 @@ void MallocDebugTest::BacktraceDumpOnSignal(bool trigger_with_alloc) {
std::string sanitized(SanitizeHeapData(actual));
std::string expected =
- "Android Native Heap Dump v1.0\n"
+ "Android Native Heap Dump v1.1\n"
"\n"
"Total memory: 405\n"
"Allocation records: 6\n"
@@ -1383,7 +1383,7 @@ TEST_F(MallocDebugTest, backtrace_dump_on_exit) {
std::string sanitized(SanitizeHeapData(actual));
std::string expected =
- "Android Native Heap Dump v1.0\n"
+ "Android Native Heap Dump v1.1\n"
"\n"
"Total memory: 1200\n"
"Allocation records: 3\n"
@@ -1436,7 +1436,7 @@ TEST_F(MallocDebugTest, backtrace_dump_on_exit_shared_backtrace) {
std::string sanitized(SanitizeHeapData(actual));
std::string expected =
- "Android Native Heap Dump v1.0\n"
+ "Android Native Heap Dump v1.1\n"
"\n"
"Total memory: 1000\n"
"Allocation records: 2\n"