[asan] poison the internal asan heap memory, just in case. Change Printf to Report when debugging globals.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146663 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_rtl.cc b/lib/asan/asan_rtl.cc
index 570dd4e..862845c 100644
--- a/lib/asan/asan_rtl.cc
+++ b/lib/asan/asan_rtl.cc
@@ -178,6 +178,8 @@
                                           MAP_PRIVATE | MAP_ANON, -1, 0);
     CHECK((allocated_current_ != (char*)-1) && "Can't mmap");
     allocated_end_ = allocated_current_ + size_to_allocate;
+    PoisonShadow((uintptr_t)allocated_current_, size_to_allocate,
+                 kAsanInternalHeapMagic);
   }
   CHECK(allocated_end_ - allocated_current_ >= size);
   void *res = allocated_current_;