src/share/vm/opto/memnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/memnode.cpp Tue Mar 1 18:11:05 2016
--- new/src/share/vm/opto/memnode.cpp Tue Mar 1 18:11:05 2016
*** 1606,1619 ****
--- 1606,1620 ----
// Decode the results of GraphKit::array_element_address.
ciArray* aobj = ary->const_oop()->as_array();
ciConstant con = aobj->element_value_by_offset(off);
if (con.basic_type() != T_ILLEGAL && !con.is_null_or_zero()) {
assert(!is_mismatched_access(con, loadbt),
! "conbt=%s; loadbt=%s", type2name(con.basic_type()), type2name(loadbt));
+ bool is_mismatched = is_mismatched_access(con, loadbt);
! assert(!is_mismatched, "conbt=%s; loadbt=%s", type2name(con.basic_type()), type2name(loadbt));
const Type* con_type = Type::make_from_constant(con);
if (con_type != NULL) {
+ // Guard against erroneous constant folding.
+ if (!is_mismatched && con_type != NULL) {
if (con_type->isa_aryptr()) {
// Join with the array element type, in case it is also stable.
int dim = ary->stable_dimension();
con_type = con_type->is_aryptr()->cast_to_stable(true, dim-1);
}
src/share/vm/opto/memnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File