diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2013-11-28 14:34:45 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2013-11-28 14:34:45 +0000 |
commit | 3d7d4b92695e189304fcfe1cdc78950b51a5dbf9 (patch) | |
tree | c3b8bef81983365bfd5604d37c20427faf0b4fdd | |
parent | 948d5200236ec7a01bd5d94649a4fd7627445499 (diff) |
PR#6243: Make "ocamlopt -g" more resistant to ill-formed locations.
(Reflecting commit r14321 on version/4.01)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14322 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | Changes | 6 | ||||
-rw-r--r-- | asmcomp/emitaux.ml | 4 |
2 files changed, 6 insertions, 4 deletions
@@ -41,8 +41,6 @@ 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 @@ -71,6 +69,10 @@ Bug fixes: - PR#6235: Issue with type information flowing through a variant pattern - PR#6240: Fail to expand module type abbreviation during substyping - PR#6241: Assumed inequality between paths involving functor arguments +- PR#6243: Make "ocamlopt -g" more resistant to ill-formed locations +- PR#6239: sometimes wrong stack alignment when raising exceptions + in -g mode with backtraces active + OCaml 4.01.0: ------------- diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml index 3ad467cbf..ccfa977ff 100644 --- a/asmcomp/emitaux.ml +++ b/asmcomp/emitaux.ml @@ -221,9 +221,9 @@ let reset_debug_info () = let emit_debug_info dbg = if is_cfi_enabled () && (!Clflags.debug || Config.with_frame_pointers) - && not (Debuginfo.is_none dbg) then begin + && dbg.Debuginfo.dinfo_line > 0 (* PR#6243 *) + then begin let line = dbg.Debuginfo.dinfo_line in - assert (line <> 0); (* clang errors out on zero line numbers *) let file_name = dbg.Debuginfo.dinfo_file in let file_num = try List.assoc file_name !file_pos_nums |