changeset 4633:c0b13febbf45

8011760: assert(delta != 0) failed: dup pointer in MemBaseline::malloc_sort_by_addr Summary: Some of qsort implementation on Linux x86 compares element to itself, which is mistakenly treated as duplicate pointer Reviewed-by: dcubed, acorn
author zgu
date Tue, 09 Jul 2013 13:18:16 -0400
parents c30107a847a3
children cd8439e6d2d6
files src/share/vm/services/memBaseline.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/memBaseline.cpp	Wed Jul 10 10:24:00 2013 -0400
+++ b/src/share/vm/services/memBaseline.cpp	Tue Jul 09 13:18:16 2013 -0400
@@ -486,7 +486,7 @@
   const MemPointerRecord* mp1 = (const MemPointerRecord*)p1;
   const MemPointerRecord* mp2 = (const MemPointerRecord*)p2;
   int delta = UNSIGNED_COMPARE(mp1->addr(), mp2->addr());
-  assert(delta != 0, "dup pointer");
+  assert(p1 == p2 || delta != 0, "dup pointer");
   return delta;
 }