8223570: Shenandoah needs to acquire lock before CLDG::clear_claimed_marks

Reviewed-by: rkennke, tschatzl
This commit is contained in:
Aleksey Shipilev 2019-05-08 14:27:14 +02:00
parent 7d1fa2315e
commit 2dede35a18

View File

@ -554,7 +554,10 @@ bool ShenandoahTraversalGC::check_and_handle_cancelled_gc(ShenandoahTaskTerminat
} }
void ShenandoahTraversalGC::concurrent_traversal_collection() { void ShenandoahTraversalGC::concurrent_traversal_collection() {
ClassLoaderDataGraph::clear_claimed_marks(); {
MutexLocker ml(ClassLoaderDataGraph_lock);
ClassLoaderDataGraph::clear_claimed_marks();
}
ShenandoahGCPhase phase_work(ShenandoahPhaseTimings::conc_traversal); ShenandoahGCPhase phase_work(ShenandoahPhaseTimings::conc_traversal);
if (!_heap->cancelled_gc()) { if (!_heap->cancelled_gc()) {