[tsan] Fix format string in WriteMemoryProfile
authorKuba Mracek <mracek@apple.com>
Mon, 7 Aug 2017 18:12:59 +0000 (18:12 +0000)
committerKuba Mracek <mracek@apple.com>
Mon, 7 Aug 2017 18:12:59 +0000 (18:12 +0000)
The current format string is broken and fails to parse.

Differential Revision: https://reviews.llvm.org/D36192

llvm-svn: 310276

compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc

index 73a656f..4570286 100644 (file)
@@ -167,8 +167,8 @@ void WriteMemoryProfile(char *buf, uptr buf_size, uptr nthread, uptr nlive) {
 #else  // !SANITIZER_GO
     "app      (0x%016zx-0x%016zx): resident %zd kB, dirty %zd kB\n"
 #endif
-    "stacks: %ld unique IDs, %ld kB allocated\n"
-    "threads: %ld total, %ld live\n"
+    "stacks: %zd unique IDs, %zd kB allocated\n"
+    "threads: %zd total, %zd live\n"
     "------------------------------\n",
     ShadowBeg(), ShadowEnd(), shadow_res / 1024, shadow_dirty / 1024,
     MetaShadowBeg(), MetaShadowEnd(), meta_res / 1024, meta_dirty / 1024,