8005114: VM is crashing in ciKlass*ciObjArrayKlass::element_klass() if metaspaces are full
authorroland
Mon, 04 Feb 2013 09:11:21 +0100
changeset 15476 5e4cda2ccd0b
parent 15475 73896d91270c
child 15477 26b2c7942f07
8005114: VM is crashing in ciKlass*ciObjArrayKlass::element_klass() if metaspaces are full Summary: missing test for loaded klass in c1 Reviewed-by: kvn
hotspot/src/share/vm/c1/c1_Instruction.cpp
--- a/hotspot/src/share/vm/c1/c1_Instruction.cpp	Fri Jan 25 16:50:33 2013 -0800
+++ b/hotspot/src/share/vm/c1/c1_Instruction.cpp	Mon Feb 04 09:11:21 2013 +0100
@@ -188,7 +188,7 @@
 
 ciType* LoadIndexed::declared_type() const {
   ciType* array_type = array()->declared_type();
-  if (array_type == NULL) {
+  if (array_type == NULL || !array_type->is_loaded()) {
     return NULL;
   }
   assert(array_type->is_array_klass(), "what else?");