# HG changeset patch # User Doug Simon # Date 1367767861 -7200 # Node ID 7207028ce060f250ff9bcac063a329cbd56cf786 # Parent 3d3da5a588bb88c134db6562a4125db4fae8fda6 ensure frame is fully restored when unwinding to exception handler in caller's frame diff -r 3d3da5a588bb -r 7207028ce060 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotJumpToExceptionHandlerInCallerOp.java --- 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;