--- old/src/hotspot/cpu/x86/compiledIC_x86.cpp 2019-09-26 07:12:34.225232252 -0400 +++ new/src/hotspot/cpu/x86/compiledIC_x86.cpp 2019-09-26 07:12:33.969232261 -0400 @@ -159,11 +159,18 @@ NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); #ifdef ASSERT - Method* old_method = reinterpret_cast(method_holder->data()); - address destination = jump->jump_destination(); + // A generated lambda form might be deleted from the Lambdaform + // cache in MethodTypeForm. If a jit compiled lambdaform method + // becomes not entrant and the cache access returns null, the new + // resolve will lead to a new generated LambdaForm. + Method* volatile old_method = reinterpret_cast(method_holder->data()); assert(old_method == NULL || old_method == callee() || - !old_method->method_holder()->is_loader_alive(), + callee->is_compiled_lambda_form() || + !old_method->method_holder()->is_loader_alive() || + old_method->is_old(), // may be race patching deoptimized nmethod due to redefinition. "a) MT-unsafe modification of inline cache"); + + volatile address destination = jump->jump_destination(); assert(destination == (address)-1 || destination == entry, "b) MT-unsafe modification of inline cache"); #endif