summaryrefslogtreecommitdiff
path: root/asmrun
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2012-08-02 12:47:08 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2012-08-02 12:47:08 +0000
commitd67f25572e36470d1d8cb85d3cd2b80073d6e6b0 (patch)
treec3f4531da6d03fd2eab735796463cf35f69b60d7 /asmrun
parent6be05dae42f9275dc3b3153aea15f8387a239a33 (diff)
downloadocaml-d67f25572e36470d1d8cb85d3cd2b80073d6e6b0.tar.gz
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@12816 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmrun')
-rw-r--r--asmrun/amd64.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/asmrun/amd64.S b/asmrun/amd64.S
index 624123397f..3d91a9ad12 100644
--- a/asmrun/amd64.S
+++ b/asmrun/amd64.S
@@ -490,9 +490,10 @@ CFI_STARTPROC
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 */