changeset 56111:5e5535d25467

8223570: Shenandoah needs to acquire lock before CLDG::clear_claimed_marks Reviewed-by: rkennke, tschatzl
author shade
date Wed, 08 May 2019 14:27:14 +0200
parents 6c1a7c2ee530
children 7dbe51e680d1
files src/hotspot/share/gc/shenandoah/shenandoahTraversalGC.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()) {