--- a/hotspot/src/share/vm/opto/memnode.cpp Fri Dec 06 12:11:51 2013 -0800
+++ b/hotspot/src/share/vm/opto/memnode.cpp Fri Dec 06 16:43:56 2013 -0800
@@ -2071,6 +2071,11 @@
if (t != NULL) {
// constant oop => constant klass
if (offset == java_lang_Class::array_klass_offset_in_bytes()) {
+ if (t->is_void()) {
+ // We cannot create a void array. Since void is a primitive type return null
+ // klass. Users of this result need to do a null check on the returned klass.
+ return TypePtr::NULL_PTR;
+ }
return TypeKlassPtr::make(ciArrayKlass::make(t));
}
if (!t->is_klass()) {