6975210: java.lang.VerifyError in some of JCK tests
authorkamg
Mon, 20 Sep 2010 15:38:04 -0400
changeset 6473 04e6d80f38b1
parent 6472 0e9400386b16
child 6474 5ef5663b9cac
6975210: java.lang.VerifyError in some of JCK tests Summary: Naked oop in verificationType::is_reference_assignable_from() Reviewed-by: never, kvn, coleenp
hotspot/src/share/vm/classfile/verificationType.cpp
--- a/hotspot/src/share/vm/classfile/verificationType.cpp	Fri Sep 17 19:45:12 2010 -0400
+++ b/hotspot/src/share/vm/classfile/verificationType.cpp	Mon Sep 20 15:38:04 2010 -0400
@@ -54,10 +54,12 @@
       // any object or array is assignable to java.lang.Object
       return true;
     }
-    klassOop this_class = SystemDictionary::resolve_or_fail(
+    klassOop obj = SystemDictionary::resolve_or_fail(
         name_handle(), Handle(THREAD, context->class_loader()),
         Handle(THREAD, context->protection_domain()), true, CHECK_false);
-    if (this_class->klass_part()->is_interface()) {
+    KlassHandle this_class(THREAD, obj);
+
+    if (this_class->is_interface()) {
       // We treat interfaces as java.lang.Object, including
       // java.lang.Cloneable and java.io.Serializable
       return true;
@@ -65,7 +67,7 @@
       klassOop from_class = SystemDictionary::resolve_or_fail(
           from.name_handle(), Handle(THREAD, context->class_loader()),
           Handle(THREAD, context->protection_domain()), true, CHECK_false);
-      return instanceKlass::cast(from_class)->is_subclass_of(this_class);
+      return instanceKlass::cast(from_class)->is_subclass_of(this_class());
     }
   } else if (is_array() && from.is_array()) {
     VerificationType comp_this = get_component(CHECK_false);