Skip to content
Permalink
Browse files
8264640: CMS ParScanClosure misses a barrier
Reviewed-by: yan, johnc
  • Loading branch information
AntonKozlov committed Apr 9, 2021
1 parent f1e4e0b commit efc81a3d63f997b538529d76582645067c6e879d
Showing with 2 additions and 0 deletions.
  1. +2 −0 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.

1 comment on commit efc81a3

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on efc81a3 Apr 9, 2021

Please sign in to comment.