[ASan] don't call strerr from functions that map memory, since this results in malloc().
authorAlexander Potapenko <glider@google.com>
Mon, 11 Mar 2013 10:21:28 +0000 (10:21 +0000)
committerAlexander Potapenko <glider@google.com>
Mon, 11 Mar 2013 10:21:28 +0000 (10:21 +0000)
llvm-svn: 176800

compiler-rt/lib/sanitizer_common/sanitizer_posix.cc

index 001ca75..773f376 100644 (file)
@@ -66,8 +66,8 @@ void *MmapOrDie(uptr size, const char *mem_type) {
       Die();
     }
     recursion_count++;
-    Report("ERROR: %s failed to allocate 0x%zx (%zd) bytes of %s: %s\n",
-           SanitizerToolName, size, size, mem_type, strerror(errno));
+    Report("ERROR: %s failed to allocate 0x%zx (%zd) bytes of %s: %d\n",
+           SanitizerToolName, size, size, mem_type, errno);
     DumpProcessMap();
     CHECK("unable to mmap" && 0);
   }