diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2013-11-27 17:10:35 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2013-11-27 17:10:35 +0000 |
commit | 948d5200236ec7a01bd5d94649a4fd7627445499 (patch) | |
tree | 8bd05a9f5fb7517e70d712e7f62162ae30da8996 | |
parent | ed23a31e78cc9139e672a7dd8d570d46cfc7e9c9 (diff) |
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
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | asmcomp/selectgen.ml | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -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 -> |