$OpenBSD: patch-asmrun_amd64_S,v 1.3 2004/06/21 18:38:48 avsm Exp $
--- asmrun/amd64.S.orig	2003-06-30 09:28:45.000000000 +0100
+++ asmrun/amd64.S	2004-03-05 11:37:40.000000000 +0000
@@ -252,7 +252,8 @@ FUNCTION(caml_start_program)
 FUNCTION(raise_caml_exception)
         movq    %rdi, %rax
         movq    caml_exception_pointer(%rip), %rsp
-        popq    caml_exception_pointer(%rip)
+	popq	%r14  /* Recover previous exception handler */
+	movq	young_ptr(%rip), %r15  /* Reload alloc ptr */
         ret
 
 /* Callback from C to Caml */
