[Sanitizer] Be consistent about separating ==%PID== and logged data.
authorAlexey Samsonov <vonosmas@gmail.com>
Tue, 31 Mar 2015 18:16:42 +0000 (18:16 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Tue, 31 Mar 2015 18:16:42 +0000 (18:16 +0000)
See https://code.google.com/p/address-sanitizer/issues/detail?id=385.

llvm-svn: 233720

compiler-rt/lib/msan/msan_report.cc
compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
compiler-rt/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc

index 33c28b2fba0e50e4313e8541116490a101592b70..ddb8070282a980ae940014d7047dacd20815a2ab 100644 (file)
@@ -103,7 +103,7 @@ void ReportUMR(StackTrace *stack, u32 origin) {
 
   Decorator d;
   Printf("%s", d.Warning());
-  Report(" WARNING: MemorySanitizer: use-of-uninitialized-value\n");
+  Report("WARNING: MemorySanitizer: use-of-uninitialized-value\n");
   Printf("%s", d.End());
   stack->Print();
   if (origin) {
@@ -115,7 +115,7 @@ void ReportUMR(StackTrace *stack, u32 origin) {
 void ReportExpectedUMRNotFound(StackTrace *stack) {
   SpinMutexLock l(&CommonSanitizerReportMutex);
 
-  Printf(" WARNING: Expected use of uninitialized value not found\n");
+  Printf("WARNING: Expected use of uninitialized value not found\n");
   stack->Print();
 }
 
index 2adc5ac849ed0350e97cc36df1a712116e2d19a8..c7f43ec0486fe073c63a9830a6dabf835fbd7b9b 100644 (file)
@@ -177,7 +177,7 @@ void CoverageData::DirectOpen() {
                     coverage_dir, internal_getpid());
   pc_fd = OpenFile(path.data(), RdWr);
   if (internal_iserror(pc_fd)) {
-    Report(" Coverage: failed to open %s for reading/writing\n", path.data());
+    Report("Coverage: failed to open %s for reading/writing\n", path.data());
     Die();
   }
 
@@ -572,7 +572,7 @@ static int CovOpenFile(InternalScopedString *path, bool packed,
   }
   uptr fd = OpenFile(path->data(), WrOnly);
   if (internal_iserror(fd)) {
-    Report(" SanitizerCoverage: failed to open %s for writing\n", path->data());
+    Report("SanitizerCoverage: failed to open %s for writing\n", path->data());
     return -1;
   }
   return fd;
index d3bde4b242a7bc558ae6a29b1c56b0737f6ed85d..76fa245da36afe7e70707406ade68956de9b54f1 100644 (file)
@@ -104,7 +104,7 @@ void CovUpdateMapping(const char *coverage_dir, uptr caller_pc) {
   CHECK_LE(res, tmp_path.size());
   uptr map_fd = OpenFile(tmp_path.data(), WrOnly);
   if (internal_iserror(map_fd, &err)) {
-    Report(" Coverage: failed to open %s for writing: %d\n", tmp_path.data(),
+    Report("Coverage: failed to open %s for writing: %d\n", tmp_path.data(),
            err);
     Die();
   }