# HG changeset patch # User tonyp # Date 1236442057 18000 # Node ID ae1579717a5711a6f00f4776a0f87ee4b22f25b6 # Parent 0db4adb6e914f030eddc7978f6db723b89c14b27 6812428: G1: Error: assert(ret || obj_in_cs(obj),"sanity") Summary: 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 diff -r 0db4adb6e914 -r ae1579717a57 src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Sat Mar 07 11:07:36 2009 -0500 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Sat Mar 07 11:07:37 2009 -0500 @@ -2509,7 +2509,7 @@ 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,