# HG changeset patch # User kvn # Date 1299858651 28800 # Node ID 45ec0a6115a06e997a74d396f35a35db6dd7bd5f # Parent 26a427ab6f32ad947cf95a3475b6367bb4847ba7 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 diff -r 26a427ab6f32 -r 45ec0a6115a0 hotspot/src/share/vm/opto/type.cpp --- a/hotspot/src/share/vm/opto/type.cpp Wed Mar 09 09:15:16 2011 -0800 +++ b/hotspot/src/share/vm/opto/type.cpp Fri Mar 11 07:50:51 2011 -0800 @@ -3781,7 +3781,7 @@ // 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.