From c25aff6c8304ff5b177ba61c3c871e6a045c2b5e Mon Sep 17 00:00:00 2001 From: kvn Date: Fri, 11 Mar 2011 07:50:51 -0800 Subject: [PATCH] 7026631: field _klass is incorrectly set for dual type of TypeAryPtr::OOPS Summary: add missing check this->dual() != TypeAryPtr::OOPS into TypeAryPtr::klass(). Reviewed-by: never --- src/share/vm/opto/type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/vm/opto/type.cpp b/src/share/vm/opto/type.cpp index 28545c639..72d52f775 100644 --- a/src/share/vm/opto/type.cpp +++ b/src/share/vm/opto/type.cpp @@ -3781,7 +3781,7 @@ ciKlass* TypeAryPtr::klass() const { // Oops, need to compute _klass and cache it ciKlass* k_ary = compute_klass(); - if( this != TypeAryPtr::OOPS ) { + if( this != TypeAryPtr::OOPS && this->dual() != TypeAryPtr::OOPS ) { // The _klass field acts as a cache of the underlying // ciKlass for this array type. In order to set the field, // we need to cast away const-ness. -- GitLab