8215395: Allow null oops in Dictionary and JNIHandle verification

Reviewed-by: eosterlund, kbarrett, coleenp
This commit is contained in:
Per Lidén 2018-12-15 20:03:06 +01:00
parent 3933c8477b
commit 1af1a69fbc
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ class DictionaryEntry : public HashtableEntry<InstanceKlass*, mtClass> {
for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint
current != NULL;
current = current->_next) {
guarantee(oopDesc::is_oop(current->_pd_cache->object_no_keepalive()), "Invalid oop");
guarantee(oopDesc::is_oop_or_null(current->_pd_cache->object_no_keepalive()), "Invalid oop");
}
}

View File

@ -318,7 +318,7 @@ void JNIHandles::print_on(outputStream* st) {
class VerifyJNIHandles: public OopClosure {
public:
virtual void do_oop(oop* root) {
guarantee(oopDesc::is_oop(RawAccess<>::oop_load(root)), "Invalid oop");
guarantee(oopDesc::is_oop_or_null(RawAccess<>::oop_load(root)), "Invalid oop");
}
virtual void do_oop(narrowOop* root) { ShouldNotReachHere(); }
};