From 8893530f3a05d48dc8b9e13b7c481dcdcedbcfbb Mon Sep 17 00:00:00 2001 From: Antonios Printezis Date: Sat, 7 Mar 2009 11:07:37 -0500 Subject: [PATCH] 6812428: G1: Error: assert(ret || obj_in_cs(obj),"sanity") The length of the fast cset test vector is decided at the beginning of a GC, but more regions can be added during the GC. The simple fix is to set the length of the fast cset test vector to the max. Reviewed-by: iveresov --- hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index efc42b440a1..6e25ee69284 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -2509,7 +2509,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(HeapRegion* popular_region) { guarantee(_in_cset_fast_test == NULL, "invariant"); guarantee(_in_cset_fast_test_base == NULL, "invariant"); - _in_cset_fast_test_length = n_regions(); + _in_cset_fast_test_length = max_regions(); _in_cset_fast_test_base = NEW_C_HEAP_ARRAY(bool, _in_cset_fast_test_length); memset(_in_cset_fast_test_base, false,