read_main_debug_info: do not die in -custom executables
authorStephane Glondu <steph@glondu.net>
Thu, 30 Jan 2020 12:07:16 +0000 (13:07 +0100)
committerStéphane Glondu <glondu@debian.org>
Thu, 30 Jan 2020 12:15:50 +0000 (13:15 +0100)
debian/patches/0006-read_main_debug_info-do-not-die-in-custom-executable.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0006-read_main_debug_info-do-not-die-in-custom-executable.patch b/debian/patches/0006-read_main_debug_info-do-not-die-in-custom-executable.patch
new file mode 100644 (file)
index 0000000..8239d57
--- /dev/null
@@ -0,0 +1,25 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Thu, 30 Jan 2020 13:06:08 +0100
+Subject: read_main_debug_info: do not die in -custom executables
+
+This fatal error occurred with some executables linked with -custom
+(with the Debian-specific patch), notably ppx preprocessors during the
+build of ppxlib.
+
+---
+ runtime/backtrace_byt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/runtime/backtrace_byt.c b/runtime/backtrace_byt.c
+index 8ea94ee..d82816c 100644
+--- a/runtime/backtrace_byt.c
++++ b/runtime/backtrace_byt.c
+@@ -342,7 +342,7 @@ static void read_main_debug_info(struct debug_info *di)
+   fd = caml_attempt_open(&exec_name, &trail, 1);
+   if (fd < 0){
+-    caml_fatal_error ("executable program file not found");
++    /* caml_fatal_error ("executable program file not found"); */
+     CAMLreturn0;
+   }
index 669f3e5768c4eec20328d7b48a04d7917b9ca0b3..091e2f65b44cd044dd133a202e9d7ba55053a9d1 100644 (file)
@@ -3,3 +3,4 @@
 0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
 0005-Check-for-definition-of-AT_SECURE-before-using-it.patch
 0008-Reimplement-custom-without-hacks.patch
+0006-read_main_debug_info-do-not-die-in-custom-executable.patch