RFR: 8182997: [MVT] ValueTypeArray.java fails with "assert(false) failed: unexpected TypeAryPtr::_klass"
tobias.hartmann at oracle.com
Thu Jul 6 08:54:03 UTC 2017
On 05.07.2017 14:47, Roland Westrelin wrote:
> 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.
Could you elaborate on why it's not always possible to determine if the unloaded class is a value type klass? Shouldn't we be able to determine this from the name?
> 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