Commits

xleroy  committed 7c70721

PR#5700: crash with native-code stack backtraces under MacOS 10.8 x86-64
(owing to wrong stack alignment in caml_raise_exception)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12816f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits d6828bc

Comments (0)

Files changed (2)

 - Moved debugger/envaux.ml to typing/envaux.ml to publish env_of_only_summary
    as part of compilerlibs, to be used on bin-annot files.
 
+
+OCaml 4.00.1:
+-------------
+
+Bug fixes:
+- PR#5700: crash with native-code stack backtraces under MacOS 10.8 x86-64
+
+
 OCaml 4.00.0:
 -------------
 

File asmrun/amd64.S

 LBL(110):
         movq    %rax, %r12            /* Save exception bucket */
         movq    %rax, C_ARG_1         /* arg 1: exception bucket */
-        movq    0(%rsp), C_ARG_2      /* arg 2: pc of raise */
-        leaq    8(%rsp), C_ARG_3      /* arg 3: sp of raise */
+        popq    C_ARG_2               /* arg 2: pc of raise */
+        movq    %rsp, C_ARG_3         /* arg 3: sp at raise */
         movq    %r14, C_ARG_4         /* arg 4: sp of handler */
+	/* PR#5700: thanks to popq above, stack is now 16-aligned */
         PREPARE_FOR_C_CALL            /* no need to cleanup after */
         call    GCALL(caml_stash_backtrace)
         movq    %r12, %rax            /* Recover exception bucket */