--- old/src/share/vm/classfile/dictionary.cpp 2017-08-28 15:35:23.674542595 -0400 +++ new/src/share/vm/classfile/dictionary.cpp 2017-08-28 15:35:23.350251594 -0400 @@ -101,7 +101,7 @@ if (protection_domain == instance_klass()->protection_domain()) { // Ensure this doesn't show up in the pd_set (invariant) bool in_pd_set = false; - for (ProtectionDomainEntry* current = _pd_set; + for (ProtectionDomainEntry* current = pd_set(); current != NULL; current = current->next()) { if (current->protection_domain() == protection_domain) { @@ -121,7 +121,7 @@ return true; } - for (ProtectionDomainEntry* current = _pd_set; + for (ProtectionDomainEntry* current = pd_set(); current != NULL; current = current->next()) { if (current->protection_domain() == protection_domain) return true; @@ -135,12 +135,8 @@ if (!contains_protection_domain(protection_domain())) { ProtectionDomainCacheEntry* entry = SystemDictionary::cache_get(protection_domain); ProtectionDomainEntry* new_head = - new ProtectionDomainEntry(entry, _pd_set); - // Warning: Preserve store ordering. The SystemDictionary is read - // without locks. The new ProtectionDomainEntry must be - // complete before other threads can be allowed to see it - // via a store to _pd_set. - OrderAccess::release_store_ptr(&_pd_set, new_head); + new ProtectionDomainEntry(entry, pd_set()); + set_pd_set(new_head); } LogTarget(Trace, protectiondomain) lt; if (lt.is_enabled()) {