diff -r 5c418c5fcade -r a4653c2a4e65 hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Wed Jul 26 11:47:11 2017 +0200 +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Wed Jul 26 11:51:25 2017 -0700 @@ -2790,7 +2790,7 @@ CALL_VM(continuation_bci = (intptr_t)InterpreterRuntime::exception_handler_for_exception(THREAD, except_oop()), handle_exception); - except_oop = THREAD->vm_result(); + except_oop = Handle(THREAD, THREAD->vm_result()); THREAD->set_vm_result(NULL); if (continuation_bci >= 0) { // Place exception on top of stack @@ -2994,7 +2994,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::throw_illegal_monitor_state_exception(THREAD)); } assert(THREAD->has_pending_exception(), "Lost our exception!"); - illegal_state_oop = THREAD->pending_exception(); + illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } @@ -3011,7 +3011,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::throw_illegal_monitor_state_exception(THREAD)); } assert(THREAD->has_pending_exception(), "Lost our exception!"); - illegal_state_oop = THREAD->pending_exception(); + illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } else { @@ -3028,7 +3028,7 @@ if (rcvr == NULL) { if (!suppress_error) { VM_JAVA_ERROR_NO_JUMP(vmSymbols::java_lang_NullPointerException(), "", note_nullCheck_trap); - illegal_state_oop = THREAD->pending_exception(); + illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } else if (UseHeavyMonitors) { @@ -3038,7 +3038,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(THREAD, base)); } if (THREAD->has_pending_exception()) { - if (!suppress_error) illegal_state_oop = THREAD->pending_exception(); + if (!suppress_error) illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } else { @@ -3059,7 +3059,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(THREAD, base)); } if (THREAD->has_pending_exception()) { - if (!suppress_error) illegal_state_oop = THREAD->pending_exception(); + if (!suppress_error) illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } }