From 329d28af161c196b4d813ebc791ce3f0a5a6e9e4 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Thu, 12 Dec 2013 15:34:28 +0100 Subject: [PATCH] Make "ocamlopt -g" more resistant to ill-formed locations --- ...more-resistant-to-ill-formed-locatio.patch | 27 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 28 insertions(+) create mode 100644 debian/patches/0016-Make-ocamlopt-g-more-resistant-to-ill-formed-locatio.patch 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 index 00000000..ceaf99f9 --- /dev/null +++ b/debian/patches/0016-Make-ocamlopt-g-more-resistant-to-ill-formed-locatio.patch @@ -0,0 +1,27 @@ +From: Xavier Leroy +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 +-- diff --git a/debian/patches/series b/debian/patches/series index 85a784a4..074c6c00 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 -- 2.30.2