8223570: Shenandoah needs to acquire lock before CLDG::clear_claimed_marks
Reviewed-by: rkennke, tschatzl
--- a/src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.cpp Wed May 08 07:56:49 2019 -0400
+++ b/src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.cpp Wed May 08 14:27:14 2019 +0200
@@ -554,7 +554,10 @@
}
void ShenandoahTraversalGC::concurrent_traversal_collection() {
- ClassLoaderDataGraph::clear_claimed_marks();
+ {
+ MutexLocker ml(ClassLoaderDataGraph_lock);
+ ClassLoaderDataGraph::clear_claimed_marks();
+ }
ShenandoahGCPhase phase_work(ShenandoahPhaseTimings::conc_traversal);
if (!_heap->cancelled_gc()) {