changeset 2067:60f88489896f

6975210: java.lang.VerifyError in some of JCK tests Summary: Naked oop in verificationType::is_reference_assignable_from() Reviewed-by: never, kvn, coleenp
author kamg
date Mon, 20 Sep 2010 15:38:04 -0400
parents 3babdb042f25
children 2966dab85b3e
files src/share/vm/classfile/verificationType.cpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/verificationType.cpp	Fri Sep 17 19:45:12 2010 -0400
+++ b/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);