6921710: G1: assert(new_finger >= _finger && new_finger < _region_limit,"invariant")

If CM task was aborted while scanning the last object of the specified region and the size of that object is equal to bitmap's granularity then the next offset would be equal or over the region limit which is exactly what the assertion states.

Reviewed-by: ysr, tonyp, jmasa
This commit is contained in:
Andrey Petrusenko 2010-03-18 01:48:28 -07:00
parent e9f77f7ec1
commit 2fa0d00635

View File

@ -3704,7 +3704,14 @@ void CMTask::do_marking_step(double time_target_ms) {
// enough to point to the next possible object header (the
// bitmap knows by how much we need to move it as it knows its
// granularity).
move_finger_to(_nextMarkBitMap->nextWord(_finger));
assert(_finger < _region_limit, "invariant");
HeapWord* new_finger = _nextMarkBitMap->nextWord(_finger);
// Check if bitmap iteration was aborted while scanning the last object
if (new_finger >= _region_limit) {
giveup_current_region();
} else {
move_finger_to(new_finger);
}
}
}
// At this point we have either completed iterating over the