From 8f5e126d8263998734d6dc1e186e55843d2ccbd2 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Sat, 5 Mar 2011 11:02:04 -0800 Subject: [PATCH] 6589823: Error: meet not symmetric Arrays pointers meet must fall to bottom if exact array klasses in upper lattice are not equal or super klass is exact. Reviewed-by: never --- hotspot/src/share/vm/opto/type.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp index 5f6550a6795..28545c6396d 100644 --- a/hotspot/src/share/vm/opto/type.cpp +++ b/hotspot/src/share/vm/opto/type.cpp @@ -3386,7 +3386,22 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const { instance_id = InstanceBot; tary = TypeAry::make(Type::BOTTOM, tary->_size); } + } else // Non integral arrays. + // Must fall to bottom if exact klasses in upper lattice + // are not equal or super klass is exact. + if ( above_centerline(ptr) && klass() != tap->klass() && + // meet with top[] and bottom[] are processed further down: + tap ->_klass != NULL && this->_klass != NULL && + // both are exact and not equal: + ((tap ->_klass_is_exact && this->_klass_is_exact) || + // 'tap' is exact and super or unrelated: + (tap ->_klass_is_exact && !tap->klass()->is_subtype_of(klass())) || + // 'this' is exact and super or unrelated: + (this->_klass_is_exact && !klass()->is_subtype_of(tap->klass())))) { + tary = TypeAry::make(Type::BOTTOM, tary->_size); + return make( NotNull, NULL, tary, lazy_klass, false, off, InstanceBot ); } + bool xk = false; switch (tap->ptr()) { case AnyNull: