RFR: 8193930: [JVMCI] calling ResolvedTypeType.getClassInitializer on an array type crashes

dean.long at oracle.com dean.long at oracle.com
Thu Dec 21 18:44:31 UTC 2017


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);

The rest looks good.

dl


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20171221/e49abdd2/attachment.html>


More information about the hotspot-compiler-dev mailing list