summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changes6
-rw-r--r--asmcomp/emitaux.ml4
2 files changed, 6 insertions, 4 deletions
diff --git a/Changes b/Changes
index b50aaefa5..7fa27a3e0 100644
--- a/Changes
+++ b/Changes
@@ -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