21 lines
972 B
Diff
21 lines
972 B
Diff
|
|
diff --git a/src/hotspot/share/gc/cms/parOopClosures.inline.hpp b/src/hotspot/share/gc/cms/parOopClosures.inline.hpp
|
||
|
|
index 1e206292d..609a14868 100644
|
||
|
|
--- a/src/hotspot/share/gc/cms/parOopClosures.inline.hpp
|
||
|
|
+++ b/src/hotspot/share/gc/cms/parOopClosures.inline.hpp
|
||
|
|
@@ -44,6 +44,7 @@ template <class T> inline void ParScanWeakRefClosure::do_oop_work(T* p) {
|
||
|
|
// we need to ensure that it is copied (see comment in
|
||
|
|
// ParScanClosure::do_oop_work).
|
||
|
|
Klass* objK = obj->klass();
|
||
|
|
+ OrderAccess::loadload();
|
||
|
|
markOop m = obj->mark_raw();
|
||
|
|
oop new_obj;
|
||
|
|
if (m->is_marked()) { // Contains forwarding pointer.
|
||
|
|
@@ -108,6 +109,7 @@ inline void ParScanClosure::do_oop_work(T* p,
|
||
|
|
// overwritten with an overflow next pointer after the object is
|
||
|
|
// forwarded.
|
||
|
|
Klass* objK = obj->klass();
|
||
|
|
+ OrderAccess::loadload();
|
||
|
|
markOop m = obj->mark_raw();
|
||
|
|
oop new_obj;
|
||
|
|
if (m->is_marked()) { // Contains forwarding pointer.
|