8214782: Add missing access barriers on CLD handle area
authorpliden
Wed, 05 Dec 2018 17:11:20 +0100
changeset 52852 eb95a38b2964
parent 52851 f0c62b8f73c0
child 52853 0e2e67902add
8214782: Add missing access barriers on CLD handle area Reviewed-by: coleenp, eosterlund
src/hotspot/share/classfile/classLoaderData.cpp
--- a/src/hotspot/share/classfile/classLoaderData.cpp	Wed Dec 05 17:11:19 2018 +0100
+++ b/src/hotspot/share/classfile/classLoaderData.cpp	Wed Dec 05 17:11:20 2018 +0100
@@ -192,7 +192,7 @@
     OrderAccess::release_store(&_head, next);
   }
   oop* handle = &_head->_data[_head->_size];
-  *handle = o;
+  NativeAccess<IS_DEST_UNINITIALIZED>::oop_store(handle, o);
   OrderAccess::release_store(&_head->_size, _head->_size + 1);
   return handle;
 }
@@ -234,7 +234,7 @@
   VerifyContainsOopClosure(oop target) : _target(target), _found(false) {}
 
   void do_oop(oop* p) {
-    if (p != NULL && oopDesc::equals(RawAccess<>::oop_load(p), _target)) {
+    if (p != NULL && oopDesc::equals(NativeAccess<AS_NO_KEEPALIVE>::oop_load(p), _target)) {
       _found = true;
     }
   }