changeset 53235:c7ab0761ef88

8215395: Allow null oops in Dictionary and JNIHandle verification Reviewed-by: eosterlund, kbarrett, coleenp
author pliden
date Sat, 15 Dec 2018 20:03:06 +0100
parents 9041178a0b69
children 83840e83476a
files src/hotspot/share/classfile/dictionary.hpp src/hotspot/share/runtime/jniHandles.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/dictionary.hpp	Fri Dec 14 19:39:39 2018 -0800
+++ b/src/hotspot/share/classfile/dictionary.hpp	Sat Dec 15 20:03:06 2018 +0100
@@ -173,7 +173,7 @@
     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");
     }
   }
 
--- a/src/hotspot/share/runtime/jniHandles.cpp	Fri Dec 14 19:39:39 2018 -0800
+++ b/src/hotspot/share/runtime/jniHandles.cpp	Sat Dec 15 20:03:06 2018 +0100
@@ -318,7 +318,7 @@
 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(); }
 };