hotspot/src/share/vm/runtime/deoptimization.cpp
changeset 43931 b31dd7e27325
parent 43461 3a591205b9bc
child 43936 093cd5bea2e2
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Thu Feb 02 16:57:01 2017 -0800
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Fri Feb 03 08:17:35 2017 +0100
@@ -221,8 +221,9 @@
       // It is not guaranteed that we can get such information here only
       // by analyzing bytecode in deoptimized frames. This is why this flag
       // is set during method compilation (see Compile::Process_OopMap_Node()).
-      // If the previous frame was popped, we don't have a result.
-      bool save_oop_result = chunk->at(0)->scope()->return_oop() && !thread->popframe_forcing_deopt_reexecution();
+      // If the previous frame was popped or if we are dispatching an exception,
+      // we don't have an oop result.
+      bool save_oop_result = chunk->at(0)->scope()->return_oop() && !thread->popframe_forcing_deopt_reexecution() && (exec_mode == Unpack_deopt);
       Handle return_value;
       if (save_oop_result) {
         // Reallocation may trigger GC. If deoptimization happened on return from