Make "ocamlopt -g" more resistant to ill-formed locations
authorStephane Glondu <steph@glondu.net>
Thu, 12 Dec 2013 14:34:28 +0000 (15:34 +0100)
committerStephane Glondu <steph@glondu.net>
Thu, 12 Dec 2013 14:34:28 +0000 (15:34 +0100)
debian/patches/0016-Make-ocamlopt-g-more-resistant-to-ill-formed-locatio.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0016-Make-ocamlopt-g-more-resistant-to-ill-formed-locatio.patch b/debian/patches/0016-Make-ocamlopt-g-more-resistant-to-ill-formed-locatio.patch
new file mode 100644 (file)
index 0000000..ceaf99f
--- /dev/null
@@ -0,0 +1,27 @@
+From: Xavier Leroy <xavier.leroy@inria.fr>
+Date: Thu, 28 Nov 2013 14:31:42 +0000
+Subject: Make "ocamlopt -g" more resistant to ill-formed locations
+
+Origin: upstream SVN, r1432
+Bug: http://caml.inria.fr/mantis/view.php?id=6243
+---
+ asmcomp/emitaux.ml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml
+index 3ad467c..ccfa977 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
+-- 
index 85a784a49c661beb20e23eae8fac460c17106045..074c6c0034e8e204302e41f31e662ff4a8cd1ad7 100644 (file)
@@ -13,3 +13,4 @@
 0013-Tune-resource-usage-of-some-tests.patch
 0014-Native-backtraces-don-t-work-on-powerpc-and-sparc.patch
 0015-Fix-native-backtraces-on-arm.patch
+0016-Make-ocamlopt-g-more-resistant-to-ill-formed-locatio.patch