changeset 1185:2edccb28b389

2008-11-06 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp (CppInterpreter::native_entry): Unwind correctly if an exception is thrown while setting up the call.
author Gary Benson <gbenson@redhat.com>
date Thu, 06 Nov 2008 07:00:19 -0500
parents a261142d4db9
children 9e45d56689ab
files ChangeLog ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
diffstat 2 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 06 06:53:14 2008 -0500
+++ b/ChangeLog	Thu Nov 06 07:00:19 2008 -0500
@@ -1,3 +1,9 @@
+2008-11-06  Gary Benson  <gbenson@redhat.com>
+
+	* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
+	(CppInterpreter::native_entry): Unwind correctly if an
+	exception is thrown while setting up the call.
+
 2008-11-06  Gary Benson  <gbenson@redhat.com>
 
 	* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Thu Nov 06 06:53:14 2008 -0500
+++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Thu Nov 06 07:00:19 2008 -0500
@@ -206,10 +206,8 @@
       }
       else {
         CALL_VM_NOCHECK(InterpreterRuntime::monitorenter(thread, monitor));
-        if (HAS_PENDING_EXCEPTION) {
-          thread->pop_zero_frame();
-          return;
-        }
+        if (HAS_PENDING_EXCEPTION)
+          goto unwind_and_return;
       }
     }
   }
@@ -220,20 +218,17 @@
     address handlerAddr = method->signature_handler();
     if (handlerAddr == NULL) {
       CALL_VM_NOCHECK(InterpreterRuntime::prepare_native_call(thread, method));
-      if (HAS_PENDING_EXCEPTION) {
-        thread->pop_zero_frame();
-        return;
-      }
+      if (HAS_PENDING_EXCEPTION)
+        goto unwind_and_return;
+
       handlerAddr = method->signature_handler();
       assert(handlerAddr != NULL, "eh?");
     }
     if (handlerAddr == (address) InterpreterRuntime::slow_signature_handler) {
       CALL_VM_NOCHECK(handlerAddr =
         InterpreterRuntime::slow_signature_handler(thread, method, NULL,NULL));
-      if (HAS_PENDING_EXCEPTION) {
-        thread->pop_zero_frame();
-        return;
-      }
+      if (HAS_PENDING_EXCEPTION)
+        goto unwind_and_return;
     }
     handler = \
       InterpreterRuntime::SignatureHandler::from_handlerAddr(handlerAddr);