git-hulk / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Minor error message defect (plus patch to fix it) #350

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This patch should fix it:

Before the patch, I was seeing error message
third_party/tcmalloc/chromium/src/system-alloc.cc:424] (null) failed.
After quickly patching in a tcmalloc bugfix, this resolves to:
third_party/tcmalloc/chromium/src/system-alloc.cc:424] SbrkSysAllocator failed.

--- trunk/src/third_party/tcmalloc/chromium/src/system-alloc.cc 2011/06/17 
07:59:58    89452
+++ trunk/src/third_party/tcmalloc/chromium/src/system-alloc.cc 2011/06/22 
04:35:03    89977
@@ -160,6 +160,7 @@
     for (int i = 0; i < kMaxAllocators; i++) {
       failed_[i] = true;
       allocs_[i] = NULL;
+      names_[i] = NULL;
     }
   }
   void SetChildAllocator(SysAllocator* alloc, unsigned int index,
@@ -167,6 +168,7 @@
     if (index < kMaxAllocators && alloc != NULL) {
       allocs_[index] = alloc;
       failed_[index] = false;
+      names_[index] = name;
     }
   }
   void* Alloc(size_t size, size_t *actual_size, size_t alignment);

Original issue reported on code.google.com by scarybea...@gmail.com on 22 Jun 2011 at 4:48

GoogleCodeExporter commented 9 years ago
Thanks!  I'll look to get this into the next release.

Original comment by csilv...@gmail.com on 22 Jun 2011 at 4:24

GoogleCodeExporter commented 9 years ago

Original comment by csilv...@gmail.com on 8 Jul 2011 at 5:05

GoogleCodeExporter commented 9 years ago
This should be fixed in perftools 1.8, just released.

Original comment by csilv...@gmail.com on 16 Jul 2011 at 1:32