RFR: 8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes
Doug Simon
doug.simon at oracle.com
Fri Dec 22 10:05:06 UTC 2017
> On 21 Dec 2017, at 19:44, dean.long at oracle.com wrote:
>
> Instead of
>
>
> 998 if (klass->is_array_klass()) {
>
> 999 return NULL;
> 1000 }
> 1001 InstanceKlass* iklass = (InstanceKlass*) klass;
> how about
>
> 998 if (!klass->is_instance_klass()) {
> 999 return NULL;
> 1000 }
> 1001 InstanceKlass* iklass = InstanceKlass::cast(klass);
Thanks for the suggestion (and review). I've updated the webrev to include it.
-Doug
> On 12/21/17 4:33 AM, Doug Simon wrote:
>> Please review this simple fix for a VM crash when calling ResolvedTypeType.getClassInitializer on an array type.
>>
>> In addition to fixing the code for ResolvedTypeType.getClassInitializer, this patch also makes CompilerToVM.getImplementor more robust in case it is called with a ResolvedjavaType representing a non-interface type.
>>
>> Lastly, there are a few minor comment formatting changes that were made automatically by Eclipse. I'd like to keep them as Eclipse is the preferred tool for developing JVMCI code.
>>
>>
>> https://bugs.openjdk.java.net/browse/JDK-8193930
>> http://cr.openjdk.java.net/~dnsimon/8193930/
>>
>>
>> -Doug
>>
>
More information about the hotspot-compiler-dev
mailing list