mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-08 05:58:38 +00:00
8214784: Adjust Dictionary and JNIHandle verification
Reviewed-by: coleenp, eosterlund
This commit is contained in:
parent
afdb850f87
commit
bfbeb1fe9e
@ -173,7 +173,7 @@ class DictionaryEntry : public HashtableEntry<InstanceKlass*, mtClass> {
|
||||
for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint
|
||||
current != NULL;
|
||||
current = current->_next) {
|
||||
oopDesc::verify(current->_pd_cache->object_no_keepalive());
|
||||
guarantee(oopDesc::is_oop(current->_pd_cache->object_no_keepalive()), "Invalid oop");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -318,7 +318,7 @@ void JNIHandles::print_on(outputStream* st) {
|
||||
class VerifyJNIHandles: public OopClosure {
|
||||
public:
|
||||
virtual void do_oop(oop* root) {
|
||||
oopDesc::verify(*root);
|
||||
guarantee(oopDesc::is_oop(RawAccess<>::oop_load(root)), "Invalid oop");
|
||||
}
|
||||
virtual void do_oop(narrowOop* root) { ShouldNotReachHere(); }
|
||||
};
|
||||
@ -327,11 +327,7 @@ void JNIHandles::verify() {
|
||||
VerifyJNIHandles verify_handle;
|
||||
|
||||
oops_do(&verify_handle);
|
||||
|
||||
// JNI weaks are handled concurrently in ZGC, so they can't be verified here
|
||||
if (!UseZGC) {
|
||||
weak_oops_do(&verify_handle);
|
||||
}
|
||||
weak_oops_do(&verify_handle);
|
||||
}
|
||||
|
||||
// This method is implemented here to avoid circular includes between
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user