comparison src/share/vm/opto/graphKit.cpp @ 955:26fbe81d30cf

6880052: SIGSEGV in GraphKit::null_check_common() Summary: Check that a klass is not NULL before the is_loaded() call. Reviewed-by: never
author kvn
date Tue, 08 Sep 2009 16:56:31 -0700
parents 0f1c19b7a52d
children 685e959d09ea
comparison
equal deleted inserted replaced
954:0f1c19b7a52d 955:26fbe81d30cf
1124 type = T_OBJECT; // simplify further tests 1124 type = T_OBJECT; // simplify further tests
1125 case T_OBJECT : { 1125 case T_OBJECT : {
1126 const Type *t = _gvn.type( value ); 1126 const Type *t = _gvn.type( value );
1127 1127
1128 const TypeOopPtr* tp = t->isa_oopptr(); 1128 const TypeOopPtr* tp = t->isa_oopptr();
1129 if (tp != NULL && !tp->klass()->is_loaded() 1129 if (tp != NULL && tp->klass() != NULL && !tp->klass()->is_loaded()
1130 // Only for do_null_check, not any of its siblings: 1130 // Only for do_null_check, not any of its siblings:
1131 && !assert_null && null_control == NULL) { 1131 && !assert_null && null_control == NULL) {
1132 // Usually, any field access or invocation on an unloaded oop type 1132 // Usually, any field access or invocation on an unloaded oop type
1133 // will simply fail to link, since the statically linked class is 1133 // will simply fail to link, since the statically linked class is
1134 // likely also to be unloaded. However, in -Xcomp mode, sometimes 1134 // likely also to be unloaded. However, in -Xcomp mode, sometimes