RFR: 8182997: [MVT] ValueTypeArray.java fails with "assert(false) failed: unexpected TypeAryPtr::_klass"

Roland Westrelin rwestrel at redhat.com
Wed Jul 5 12:47:01 UTC 2017


When a value class is unloaded, a ciInstanceKlass is created. When an
array of value class is unloaded, a ciObjArrayKlass is created. In this
case, [QMyValue; is unloaded. When TypeAryPtr::compute_klass() is called
for that array, it creates a ciObjArrayKlass with symbol [LMyValue;
because it has no way to tell the array of an unloaded instance class is
an array of values. The mismatch with [QMyValue; causes the assert

Ideally, we would not create a ciInstanceKlass for an unloaded value
class but a ciValueKlass. The problem is that it's not always possible
to tell if an unloaded class is an instance or not. The fix I'm
proposing rewrites the signature of the unloaded array from [QMyValue;
to [LMyValue;. It's quite ugly but I don't see a better fix.


More information about the valhalla-dev mailing list