Fri, 28 Aug 2009 11:19:33 -0700
6875577: CTW fails with /hotspot/src/share/vm/opto/memnode.cpp
Summary: Fix do_null_check to check for unloaded klass for all oop pointers.
Reviewed-by: never, cfang
src/share/vm/opto/graphKit.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/opto/library_call.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/graphKit.cpp Thu Aug 27 06:17:23 2009 -0700 1.2 +++ b/src/share/vm/opto/graphKit.cpp Fri Aug 28 11:19:33 2009 -0700 1.3 @@ -622,11 +622,13 @@ 1.4 1.5 //---------------------------PreserveReexecuteState---------------------------- 1.6 PreserveReexecuteState::PreserveReexecuteState(GraphKit* kit) { 1.7 + assert(!kit->stopped(), "must call stopped() before"); 1.8 _kit = kit; 1.9 _sp = kit->sp(); 1.10 _reexecute = kit->jvms()->_reexecute; 1.11 } 1.12 PreserveReexecuteState::~PreserveReexecuteState() { 1.13 + if (_kit->stopped()) return; 1.14 _kit->jvms()->_reexecute = _reexecute; 1.15 _kit->set_sp(_sp); 1.16 } 1.17 @@ -1123,7 +1125,7 @@ 1.18 case T_OBJECT : { 1.19 const Type *t = _gvn.type( value ); 1.20 1.21 - const TypeInstPtr* tp = t->isa_instptr(); 1.22 + const TypeOopPtr* tp = t->isa_oopptr(); 1.23 if (tp != NULL && !tp->klass()->is_loaded() 1.24 // Only for do_null_check, not any of its siblings: 1.25 && !assert_null && null_control == NULL) {
2.1 --- a/src/share/vm/opto/library_call.cpp Thu Aug 27 06:17:23 2009 -0700 2.2 +++ b/src/share/vm/opto/library_call.cpp Fri Aug 28 11:19:33 2009 -0700 2.3 @@ -3894,6 +3894,7 @@ 2.4 assert(obj_size != NULL, ""); 2.5 Node* raw_obj = alloc_obj->in(1); 2.6 assert(alloc_obj->is_CheckCastPP() && raw_obj->is_Proj() && raw_obj->in(0)->is_Allocate(), ""); 2.7 + assert(alloc_obj->as_CheckCastPP()->type() != TypeInstPtr::NOTNULL, "should be more precise than Object"); 2.8 2.9 if (ReduceBulkZeroing) { 2.10 // We will be completely responsible for initializing this object - 2.11 @@ -4447,6 +4448,7 @@ 2.12 InitializeNode* init = alloc->initialization(); 2.13 assert(init->is_complete(), "we just did this"); 2.14 assert(dest->is_CheckCastPP(), "sanity"); 2.15 + assert(dest->as_CheckCastPP()->type() != TypeInstPtr::NOTNULL, "type should be more precise than Object"); 2.16 assert(dest->in(0)->in(0) == init, "dest pinned"); 2.17 2.18 // Cast to Object for arraycopy.