8214782: Add missing access barriers on CLD handle area
Reviewed-by: coleenp, eosterlund
--- 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;
}
}