Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit efc81a3

Browse files
committed
8264640: CMS ParScanClosure misses a barrier
Reviewed-by: yan, johnc
1 parent f1e4e0b commit efc81a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hotspot/share/gc/cms/parOopClosures.inline.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ template <class T> inline void ParScanWeakRefClosure::do_oop_work(T* p) {
4444
// we need to ensure that it is copied (see comment in
4545
// ParScanClosure::do_oop_work).
4646
Klass* objK = obj->klass();
47+
OrderAccess::loadload();
4748
markOop m = obj->mark_raw();
4849
oop new_obj;
4950
if (m->is_marked()) { // Contains forwarding pointer.
@@ -108,6 +109,7 @@ inline void ParScanClosure::do_oop_work(T* p,
108109
// overwritten with an overflow next pointer after the object is
109110
// forwarded.
110111
Klass* objK = obj->klass();
112+
OrderAccess::loadload();
111113
markOop m = obj->mark_raw();
112114
oop new_obj;
113115
if (m->is_marked()) { // Contains forwarding pointer.

0 commit comments

Comments
 (0)