Next mark bitmap clearing is supposed to abort after a concurrent mark abort. It does not because the condition is wrong.
I.e. the current code
// Abort iteration if after yielding the marking has been aborted.
if (_cm != NULL && _cm->do_yield_check() && _cm->has_aborted()) {
return true;
}
is wrong. Correct code is:
if (_cm != NULL) {
_cm->do_yield_check();
if (_cm->has_aborted) {
return true;
}
}
Currently this has no impact except for wasted time. However with JDK-8253600 it will clear the prev bitmap containing liveness information (previously passed as next bitmap into the task) as the full gc will first update the next bitmap and then swap bitmaps.