8131645: [ARM64] crash on Cavium when using G1
authorecaspole
Mon, 21 Sep 2015 10:36:36 -0400
changeset 33093 5aa0f908f8cd
parent 32826 14b2ab72189f
child 33094 f10fe3dec526
8131645: [ARM64] crash on Cavium when using G1 Summary: Add a fence when creating the CodeRootSetTable so the readers do not see invalid memory. Reviewed-by: aph, tschatzl
hotspot/src/share/vm/gc/g1/g1CodeCacheRemSet.cpp
--- a/hotspot/src/share/vm/gc/g1/g1CodeCacheRemSet.cpp	Mon Sep 21 17:49:57 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CodeCacheRemSet.cpp	Mon Sep 21 10:36:36 2015 -0400
@@ -197,7 +197,9 @@
 }
 
 void G1CodeRootSet::allocate_small_table() {
-  _table = new CodeRootSetTable(SmallSize);
+  CodeRootSetTable* temp = new CodeRootSetTable(SmallSize);
+
+  OrderAccess::release_store_ptr(&_table, temp);
 }
 
 void CodeRootSetTable::purge_list_append(CodeRootSetTable* table) {