--- old/src/share/vm/gc/g1/g1FromCardCache.cpp 2015-12-21 12:23:23.183150219 +0100 +++ new/src/share/vm/gc/g1/g1FromCardCache.cpp 2015-12-21 12:23:23.093147549 +0100 @@ -48,9 +48,10 @@ guarantee((size_t)start_idx + new_num_regions <= max_uintx, "Trying to invalidate beyond maximum region, from %u size " SIZE_FORMAT, start_idx, new_num_regions); + uint end_idx = (start_idx + (uint)new_num_regions); + assert(end_idx <= _max_regions, "Must be within max."); + for (uint i = 0; i < G1RemSet::num_par_rem_sets(); i++) { - uint end_idx = (start_idx + (uint)new_num_regions); - assert(end_idx <= _max_regions, "Must be within max."); for (uint j = start_idx; j < end_idx; j++) { set(i, j, InvalidCard); }