Tue, 07 Sep 2010 11:31:27 -0700
6982533: Crash in ~StubRoutines::jbyte_fill with AggressiveOpts enabled
Reviewed-by: kvn
src/share/vm/opto/loopTransform.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/loopTransform.cpp Tue Sep 07 14:16:50 2010 -0700 1.2 +++ b/src/share/vm/opto/loopTransform.cpp Tue Sep 07 11:31:27 2010 -0700 1.3 @@ -2417,6 +2417,8 @@ 1.4 Node* value = n->in(MemNode::ValueIn); 1.5 if (!lpt->is_invariant(value)) { 1.6 msg = "variant store value"; 1.7 + } else if (!_igvn.type(n->in(MemNode::Address))->isa_aryptr()) { 1.8 + msg = "not array address"; 1.9 } 1.10 store = n; 1.11 store_value = value; 1.12 @@ -2468,6 +2470,7 @@ 1.13 // head->phi * elsize + con. head->phi might have a ConvI2L. 1.14 Node* elements[4]; 1.15 Node* conv = NULL; 1.16 + bool found_index = false; 1.17 int count = store->in(MemNode::Address)->as_AddP()->unpack_offsets(elements, ARRAY_SIZE(elements)); 1.18 for (int e = 0; e < count; e++) { 1.19 Node* n = elements[e]; 1.20 @@ -2484,17 +2487,20 @@ 1.21 if (value != head->phi()) { 1.22 msg = "unhandled shift in address"; 1.23 } else { 1.24 + found_index = true; 1.25 shift = n; 1.26 assert(type2aelembytes(store->as_Mem()->memory_type(), true) == 1 << shift->in(2)->get_int(), "scale should match"); 1.27 } 1.28 } else if (n->Opcode() == Op_ConvI2L && conv == NULL) { 1.29 if (n->in(1) == head->phi()) { 1.30 + found_index = true; 1.31 conv = n; 1.32 } else { 1.33 msg = "unhandled input to ConvI2L"; 1.34 } 1.35 } else if (n == head->phi()) { 1.36 // no shift, check below for allowed cases 1.37 + found_index = true; 1.38 } else { 1.39 msg = "unhandled node in address"; 1.40 msg_node = n; 1.41 @@ -2506,6 +2512,10 @@ 1.42 msg_node = store; 1.43 } 1.44 1.45 + if (!found_index) { 1.46 + msg = "missing use of index"; 1.47 + } 1.48 + 1.49 // byte sized items won't have a shift 1.50 if (msg == NULL && shift == NULL && t != T_BYTE && t != T_BOOLEAN) { 1.51 msg = "can't find shift";