--- old/src/share/vm/opto/library_call.cpp 2016-10-24 05:13:08.597023083 -0700 +++ new/src/share/vm/opto/library_call.cpp 2016-10-24 05:13:08.468022307 -0700 @@ -2636,8 +2636,13 @@ Compile::AliasType* alias_type = C->alias_type(adr_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 && + alias_type->basic_type() == T_ILLEGAL) { + return false; + } + bool mismatched = false; BasicType bt = alias_type->basic_type(); if (bt != T_ILLEGAL) { @@ -2960,12 +2965,6 @@ newval = argument(4); // type: oop, int, or long } - // Null check receiver. - receiver = null_check(receiver); - if (stopped()) { - return true; - } - // Build field offset expression. // We currently rely on the cookies produced by Unsafe.xxxFieldOffset // to be plain byte offsets, which are also the same as those accepted @@ -2977,8 +2976,6 @@ 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(); if (bt != T_ILLEGAL && ((bt == T_OBJECT || bt == T_ARRAY) != (type == T_OBJECT))) { @@ -2998,6 +2995,12 @@ } } + // Null check receiver. + receiver = null_check(receiver); + if (stopped()) { + return true; + } + int alias_idx = C->get_alias_index(adr_type); // Memory-model-wise, a LoadStore acts like a little synchronized