--- old/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp 2021-01-25 19:30:30.671782106 +0000 +++ new/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp 2021-01-25 19:30:30.552780856 +0000 @@ -205,7 +205,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) {