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

Commit

Permalink
Add missing barriers
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKozlov committed Apr 2, 2021
1 parent fecca4e commit 4cff5d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hotspot/share/gc/cms/parOopClosures.inline.hpp
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4cff5d5

Please sign in to comment.