8005114: VM is crashing in ciKlass*ciObjArrayKlass::element_klass() if metaspaces are full
Summary: missing test for loaded klass in c1
Reviewed-by: kvn
--- 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?");