--- old/src/share/vm/opto/library_call.cpp 2016-04-30 03:39:59.000000000 +0300 +++ new/src/share/vm/opto/library_call.cpp 2016-04-30 03:39:59.000000000 +0300 @@ -2420,12 +2420,18 @@ // Try to categorize the address. If it comes up as TypeJavaPtr::BOTTOM, // there was not enough information to nail it down. Compile::AliasType* alias_type = C->alias_type(adr_type); + BasicType bt = alias_type->basic_type(); + assert(alias_type->index() != Compile::AliasIdxBot, "no bare pointers here"); - assert(alias_type->adr_type() == TypeRawPtr::BOTTOM || alias_type->adr_type() == TypeOopPtr::BOTTOM || - alias_type->basic_type() != T_ILLEGAL, "field, array element or unknown"); + // Only field, array element or unknown locations are supported. + if (alias_type->adr_type() != TypeRawPtr::BOTTOM && + alias_type->adr_type() != TypeOopPtr::BOTTOM && + bt == T_ILLEGAL) { + return false; + } + bool mismatched = false; - BasicType bt = alias_type->basic_type(); if (bt != T_ILLEGAL) { if (bt == T_BYTE && adr_type->isa_aryptr()) { // Alias type doesn't differentiate between byte[] and boolean[]). @@ -2814,9 +2820,14 @@ const TypePtr *adr_type = _gvn.type(adr)->isa_ptr(); Compile::AliasType* alias_type = C->alias_type(adr_type); - assert(alias_type->adr_type() == TypeRawPtr::BOTTOM || alias_type->adr_type() == TypeOopPtr::BOTTOM || - alias_type->basic_type() != T_ILLEGAL, "field, array element or unknown"); BasicType bt = alias_type->basic_type(); + + // Only field, array element or unknown locations are supported. + if (alias_type->adr_type() != TypeRawPtr::BOTTOM && + alias_type->adr_type() != TypeOopPtr::BOTTOM && + bt == T_ILLEGAL) { + return false; + } if (bt != T_ILLEGAL && ((bt == T_OBJECT || bt == T_ARRAY) != (type == T_OBJECT))) { // Don't intrinsify mismatched object accesses.