From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/crm114/, app-text/crm114/files/
Date: Mon, 6 May 2024 04:39:47 +0000 (UTC) [thread overview]
Message-ID: <1714970367.2839302f8546d1a9c64f1c92684b8eadf23844b0.sam@gentoo> (raw)
commit: 2839302f8546d1a9c64f1c92684b8eadf23844b0
Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon May 6 04:33:31 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 6 04:39:27 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2839302f
app-text/crm114: fix LTO error due to broken function signatures
It is ancient sourceforge software from 2009. Not submitted upstream.
Closes: https://bugs.gentoo.org/854897
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...0100106-r1.ebuild => crm114-20100106-r2.ebuild} | 9 ++++-
...function-signatures-for-5-argument-functi.patch | 43 ++++++++++++++++++++++
2 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/app-text/crm114/crm114-20100106-r1.ebuild b/app-text/crm114/crm114-20100106-r2.ebuild
similarity index 85%
rename from app-text/crm114/crm114-20100106-r1.ebuild
rename to app-text/crm114/crm114-20100106-r2.ebuild
index 97d0d5c39cc0..a5d4a7b851d4 100644
--- a/app-text/crm114/crm114-20100106-r1.ebuild
+++ b/app-text/crm114/crm114-20100106-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -25,7 +25,12 @@ DEPEND="${RDEPEND}
S="${WORKDIR}"/${MY_P}
-PATCHES=( "${FILESDIR}"/${P}-fix-makefile.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-makefile.patch
+ # https://bugs.gentoo.org/854897
+ # Upstream is dead since 2009 so no point submitting this to them.
+ "${FILESDIR}"/0001-fix-broken-function-signatures-for-5-argument-functi.patch
+)
src_prepare() {
default
diff --git a/app-text/crm114/files/0001-fix-broken-function-signatures-for-5-argument-functi.patch b/app-text/crm114/files/0001-fix-broken-function-signatures-for-5-argument-functi.patch
new file mode 100644
index 000000000000..ab2ebcaa368d
--- /dev/null
+++ b/app-text/crm114/files/0001-fix-broken-function-signatures-for-5-argument-functi.patch
@@ -0,0 +1,43 @@
+From c0cb641ec6c1ab960df91c23b726836add0ca3a5 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Mon, 6 May 2024 00:26:18 -0400
+Subject: [PATCH] fix broken function signatures for 5-argument functions
+
+These are always called before exit() so presumably no one noticed that
+these "log error and exit(-1)" functions were prone to "exiting with an
+error" (our new term for "hello how would you like to have some UB").
+
+However, the LTO optimizer noticed what was being done and died in
+painful agony. Bring it back to life and soothe its hurts.
+---
+ crm_util_errorhandlers.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/crm_util_errorhandlers.c b/crm_util_errorhandlers.c
+index 1f64f3c..cba9d89 100644
+--- a/crm_util_errorhandlers.c
++++ b/crm_util_errorhandlers.c
+@@ -23,17 +23,17 @@ long untrappableerror ( char *str1, char *str2)
+ fprintf (stderr, "ERROR: %s%s \n", str1, str2);
+ exit (-1);
+ }
+-long fatalerror5 ( char *str1, char *str2)
++long fatalerror5 ( char *str1, char *str2, char* myfile, char* myfunction, unsigned myline)
+ {
+ fprintf (stderr, "ERROR: %s%s \n", str1, str2);
+ exit (-1);
+ }
+-long nonfatalerror5 ( char *str1, char *str2)
++long nonfatalerror5 ( char *str1, char *str2, char* myfile, char* myfunction, unsigned myline)
+ {
+ fprintf (stderr, "ERROR: %s%s \n", str1, str2);
+ exit (-1);
+ }
+-long untrappableerror5 ( char *str1, char *str2)
++long untrappableerror5 ( char *str1, char *str2, char* myfile, char* myfunction, unsigned myline)
+ {
+ fprintf (stderr, "ERROR: %s%s \n", str1, str2);
+ exit (-1);
+--
+2.43.2
+
next reply other threads:[~2024-05-06 4:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 4:39 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-12-13 19:07 [gentoo-commits] repo/gentoo:master commit in: app-text/crm114/, app-text/crm114/files/ David Seifert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1714970367.2839302f8546d1a9c64f1c92684b8eadf23844b0.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox