changeset 9566:7207028ce060

ensure frame is fully restored when unwinding to exception handler in caller's frame
author Doug Simon <doug.simon@oracle.com>
date Sun, 05 May 2013 17:31:01 +0200
parents 3d3da5a588bb
children a8b4f26d8485
files graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java	Sun May 05 00:17:52 2013 +0200
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java	Sun May 05 17:31:01 2013 +0200
@@ -55,6 +55,9 @@
     public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) {
         leaveFrameAndRestoreRbp(tasm, masm);
 
+        // Discard the return address, thus completing restoration of caller frame
+        masm.incrementq(rsp, 8);
+
         // Restore rsp from rbp if the exception PC is a method handle call site.
         Register thread = graalRuntime().getRuntime().threadRegister();
         int isMethodHandleReturnOffset = graalRuntime().getConfig().threadIsMethodHandleReturnOffset;