From 948d5200236ec7a01bd5d94649a4fd7627445499 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 27 Nov 2013 17:10:35 +0000 Subject: PR#6239: a "raise" in -g mode can end up calling a C function (stash_backtrace). Therefore the containing function must not be a leaf function, so that on x86-32/MacOSX and x86-64, the stack is properly 16-realigned on entrance to containing function. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14316 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- Changes | 2 ++ asmcomp/selectgen.ml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Changes b/Changes index bc1a85dad..b50aaefa5 100644 --- a/Changes +++ b/Changes @@ -41,6 +41,8 @@ Bug fixes: - PR#6109: Typos in ocamlbuild error messages - PR#6116: more efficient implementation of Digest.to_hex (patch by ygrek) - PR#6174: OCaml compiler loops on an example using GADTs (-rectypes case) +- PR#6239: sometimes wrong stack alignment when raising exceptions + in -g mode with backtraces active Standard library: - PR#4986: add List.sort_uniq and Set.of_list diff --git a/asmcomp/selectgen.ml b/asmcomp/selectgen.ml index 8f1277a17..7c52f524d 100644 --- a/asmcomp/selectgen.ml +++ b/asmcomp/selectgen.ml @@ -433,6 +433,8 @@ method emit_expr env exp = Some(self#emit_tuple ext_env simple_list) end | Cop(Craise (k, dbg), [arg]) -> + if !Clflags.debug && k <> Lambda.Raise_notrace then + Proc.contains_calls := true; (* PR#6239 *) begin match self#emit_expr env arg with None -> None | Some r1 -> -- cgit v1.2.3-70-g09d2