--- old/src/cpu/x86/vm/sharedRuntime_x86_64.cpp 2019-04-11 21:28:17.541976216 +0000 +++ new/src/cpu/x86/vm/sharedRuntime_x86_64.cpp 2019-04-11 21:28:17.441975580 +0000 @@ -2499,14 +2499,11 @@ __ reset_last_Java_frame(false); - // Unpack oop result + // Unbox oop result, e.g. JNIHandles::resolve value. if (ret_type == T_OBJECT || ret_type == T_ARRAY) { - Label L; - __ testptr(rax, rax); - __ jcc(Assembler::zero, L); - __ movptr(rax, Address(rax, 0)); - __ bind(L); - __ verify_oop(rax); + __ resolve_jobject(rax /* value */, + r15_thread /* thread */, + rcx /* tmp */); } if (!is_critical_native) {