mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-11 23:48:38 +00:00
6975210: java.lang.VerifyError in some of JCK tests
Naked oop in verificationType::is_reference_assignable_from() Reviewed-by: never, kvn, coleenp
This commit is contained in:
parent
de088dd719
commit
bc7a44e595
@ -54,10 +54,12 @@ bool VerificationType::is_reference_assignable_from(
|
||||
// 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 @@ bool VerificationType::is_reference_assignable_from(
|
||||
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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user