7003860: G1: assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region) fails
authortonyp
Thu, 02 Dec 2010 13:20:39 -0500
changeset 7400 39b4f2314833
parent 7399 4ecd771fa2d1
child 7412 f50bd8c3a2fd
child 7416 cfe3bfab7d48
child 7417 0fa6a0a76d54
7003860: G1: assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region) fails Summary: Wrong assumption about expecting the current alloc region expected to be NULL in expand_and_allocate(). Reviewed-by: brutisso, ysr
hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Dec 01 17:34:02 2010 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Dec 02 13:20:39 2010 -0500
@@ -920,8 +920,10 @@
                                            bool expect_null_cur_alloc_region) {
   assert_at_safepoint();
   assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region,
-         "The current alloc region should only be non-NULL if we're "
-         "expecting it not to be NULL");
+         err_msg("the current alloc region was unexpectedly found "
+                 "to be non-NULL, cur alloc region: "PTR_FORMAT" "
+                 "expect_null_cur_alloc_region: %d word_size: "SIZE_FORMAT,
+                 _cur_alloc_region, expect_null_cur_alloc_region, word_size));
 
   if (!isHumongous(word_size)) {
     if (!expect_null_cur_alloc_region) {
@@ -1597,7 +1599,7 @@
   assert(regions_accounted_for(), "Region leakage!");
 
   return attempt_allocation_at_safepoint(word_size,
-                                      true /* expect_null_cur_alloc_region */);
+                                     false /* expect_null_cur_alloc_region */);
 }
 
 size_t G1CollectedHeap::free_region_if_totally_empty(HeapRegion* hr) {