summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-11-24 09:08:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-25 21:55:10 +0000
commit5185608b6012f8fcf5945a7b3e11b1a22376c0a3 (patch)
tree552a48622d18b438807974e706b8135adf58d36b /meta/recipes-devtools/elfutils
parent8259247df2138957fac720222aaa0396fa5eea69 (diff)
downloadpoky-5185608b6012f8fcf5945a7b3e11b1a22376c0a3.tar.gz
elfutils: update 0.185 -> 0.186
Drop glibc-2.34-fix.patch merged upstream. Rework support for error() on non-glibc targets: upstream now provides its own implementation, so we can drop the patch that adds ours; said implementation isn't build-tested with tests, so ptest has to be disabled on musl. This, in turns, allows dropping 0004-Fix-error-on-musl.patch. License-Update: copyright years (From OE-Core rev: 9c51ae20c0e4c0d3e7161fc6b51fca078dbf014a) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils')
-rw-r--r--meta/recipes-devtools/elfutils/elfutils_0.186.bb (renamed from meta/recipes-devtools/elfutils/elfutils_0.185.bb)12
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch54
-rw-r--r--meta/recipes-devtools/elfutils/files/0002-musl-libs.patch118
-rw-r--r--meta/recipes-devtools/elfutils/files/0003-musl-utils.patch6
-rw-r--r--meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch36
-rw-r--r--meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch8
-rw-r--r--meta/recipes-devtools/elfutils/files/glibc-2.34-fix.patch138
7 files changed, 65 insertions, 307 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.185.bb b/meta/recipes-devtools/elfutils/elfutils_0.186.bb
index f4769e3632..b3588a2196 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.185.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.186.bb
@@ -4,7 +4,7 @@ DESCRIPTION = "elfutils is a collection of utilities and libraries to read, crea
4SECTION = "base" 4SECTION = "base"
5LICENSE = "GPLv2 & GPLv2+ & LGPLv3+ & GPLv3+" 5LICENSE = "GPLv2 & GPLv2+ & LGPLv3+ & GPLv3+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
7 file://debuginfod/debuginfod-client.c;endline=27;md5=f8e9d171c401c493ec45a0b2992ea2ed \ 7 file://debuginfod/debuginfod-client.c;endline=27;md5=d2adfd8f5347d4c96e3c280393ce66da \
8 " 8 "
9DEPENDS = "zlib virtual/libintl" 9DEPENDS = "zlib virtual/libintl"
10DEPENDS:append:libc-musl = " argp-standalone fts musl-obstack " 10DEPENDS:append:libc-musl = " argp-standalone fts musl-obstack "
@@ -22,20 +22,16 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
22 file://ptest.patch \ 22 file://ptest.patch \
23 file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \ 23 file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
24 file://0001-debuginfod-debuginfod-client.c-correct-string-format.patch \ 24 file://0001-debuginfod-debuginfod-client.c-correct-string-format.patch \
25 file://glibc-2.34-fix.patch \ 25 file://0001-debuginfod-fix-compilation-on-platforms-without-erro.patch \
26 " 26 "
27SRC_URI:append:libc-musl = " \ 27SRC_URI:append:libc-musl = " \
28 file://0002-musl-libs.patch \
29 file://0003-musl-utils.patch \ 28 file://0003-musl-utils.patch \
30 file://0004-Fix-error-on-musl.patch \
31 file://0015-config-eu.am-do-not-use-Werror.patch \ 29 file://0015-config-eu.am-do-not-use-Werror.patch \
32 " 30 "
33SRC_URI[sha256sum] = "dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6" 31SRC_URI[sha256sum] = "7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177"
34
35# remove at next version upgrade or when output changes
36PR = "r1"
37 32
38inherit autotools gettext ptest pkgconfig 33inherit autotools gettext ptest pkgconfig
34PTEST_ENABLED:libc-musl = "0"
39 35
40EXTRA_OECONF = "--program-prefix=eu-" 36EXTRA_OECONF = "--program-prefix=eu-"
41 37
diff --git a/meta/recipes-devtools/elfutils/files/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch b/meta/recipes-devtools/elfutils/files/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch
new file mode 100644
index 0000000000..e80d96aaca
--- /dev/null
+++ b/meta/recipes-devtools/elfutils/files/0001-debuginfod-fix-compilation-on-platforms-without-erro.patch
@@ -0,0 +1,54 @@
1From 99617d7ab5b01c322b0f27d4aa0dd91c61793a5e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
3Date: Wed, 10 Nov 2021 21:17:48 -0300
4Subject: [PATCH] debuginfod: fix compilation on platforms without <error.h>
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9"system.h" only declares the error() function, so it needs to be in an
10'extern "C"' block, otherwise linking fails.
11
12Since we are here, use quotes for "system.h" header, since it's a local
13header, not a system one.
14
15Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=90b9e91b961b794a4e58ab76d9191a5e7343584e]
16Signed-off-by: Érico Nogueira <erico.erc@gmail.com>
17Signed-off-by: Alexander Kanavin <alex@linutronix.de>
18---
19 debuginfod/ChangeLog | 4 ++++
20 debuginfod/debuginfod.cxx | 2 +-
21 2 files changed, 5 insertions(+), 1 deletion(-)
22
23diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
24index f06d3ee..822bd63 100644
25--- a/debuginfod/ChangeLog
26+++ b/debuginfod/ChangeLog
27@@ -1,3 +1,7 @@
28+2021-11-10 Érico N. Rolim <erico.erc@gmail.com>
29+
30+ * debuginfod.cxx: include "system.h" under 'extern "C"' block.
31+
32 2021-11-05 Frank Ch. Eigler <fche@redhat.com>
33
34 PR28430
35diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
36index 521cb52..764e7b9 100644
37--- a/debuginfod/debuginfod.cxx
38+++ b/debuginfod/debuginfod.cxx
39@@ -33,11 +33,11 @@
40
41 extern "C" {
42 #include "printversion.h"
43+#include "system.h"
44 }
45
46 #include "debuginfod.h"
47 #include <dwarf.h>
48-#include <system.h>
49
50 #include <argp.h>
51 #ifdef __GNUC__
52--
532.20.1
54
diff --git a/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch b/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
deleted file mode 100644
index c7360da7a7..0000000000
--- a/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
+++ /dev/null
@@ -1,118 +0,0 @@
1From 0f4667f0bb4b000d74ade07e90bd690b7217a19d Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:18:47 +0800
4Subject: [PATCH] musl-libs
5
6Collection of fixes needed to compile libelf and other libraries
7provided by elfutils for musl targets
8
9error is glibc specific API, so this patch will mostly not accepted
10upstream given that elfutils has been closely tied to glibc
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13Upstream-Status: Inappropriate [workaround for musl]
14
15Rebase to 0.177
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17
18---
19 lib/error.h | 27 +++++++++++++++++++++++++++
20 lib/fixedsizehash.h | 1 -
21 lib/libeu.h | 1 +
22 libdwfl/linux-kernel-modules.c | 1 +
23 libelf/elf.h | 7 +++++++
24 5 files changed, 36 insertions(+), 1 deletion(-)
25 create mode 100644 lib/error.h
26
27diff --git a/lib/error.h b/lib/error.h
28new file mode 100644
29index 0000000..ef06827
30--- /dev/null
31+++ b/lib/error.h
32@@ -0,0 +1,27 @@
33+#ifndef _ERROR_H_
34+#define _ERROR_H_
35+
36+#include <stdarg.h>
37+#include <stdio.h>
38+#include <stdlib.h>
39+#include <string.h>
40+#include <errno.h>
41+
42+static unsigned int error_message_count = 0;
43+
44+static inline void error(int status, int errnum, const char* format, ...)
45+{
46+ va_list ap;
47+ fprintf(stderr, "%s: ", program_invocation_name);
48+ va_start(ap, format);
49+ vfprintf(stderr, format, ap);
50+ va_end(ap);
51+ if (errnum)
52+ fprintf(stderr, ": %s", strerror(errnum));
53+ fprintf(stderr, "\n");
54+ error_message_count++;
55+ if (status)
56+ exit(status);
57+}
58+
59+#endif /* _ERROR_H_ */
60diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h
61index dac2a5f..43016fc 100644
62--- a/lib/fixedsizehash.h
63+++ b/lib/fixedsizehash.h
64@@ -30,7 +30,6 @@
65 #include <errno.h>
66 #include <stdlib.h>
67 #include <string.h>
68-#include <sys/cdefs.h>
69
70 #include <system.h>
71
72diff --git a/lib/libeu.h b/lib/libeu.h
73index ecb4d01..edc85e3 100644
74--- a/lib/libeu.h
75+++ b/lib/libeu.h
76@@ -29,6 +29,7 @@
77 #ifndef LIBEU_H
78 #define LIBEU_H
79
80+#include "system.h"
81 #include <stddef.h>
82 #include <stdint.h>
83
84diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
85index c0f8dfa..aa78033 100644
86--- a/libdwfl/linux-kernel-modules.c
87+++ b/libdwfl/linux-kernel-modules.c
88@@ -50,6 +50,7 @@
89 #include <sys/utsname.h>
90 #include <fcntl.h>
91 #include <unistd.h>
92+#include "system.h"
93
94 /* If fts.h is included before config.h, its indirect inclusions may not
95 give us the right LFS aliases of these functions, so map them manually. */
96diff --git a/libelf/elf.h b/libelf/elf.h
97index 8e3e618..1353890 100644
98--- a/libelf/elf.h
99+++ b/libelf/elf.h
100@@ -19,6 +19,10 @@
101 #ifndef _ELF_H
102 #define _ELF_H 1
103
104+#ifdef __cplusplus
105+extern "C" {
106+#endif
107+
108 /* Standard ELF types. */
109
110 #include <stdint.h>
111@@ -4102,4 +4106,7 @@ enum
112 #define R_ARC_TLS_LE_S9 0x4a
113 #define R_ARC_TLS_LE_32 0x4b
114
115+#ifdef __cplusplus
116+}
117+#endif
118 #endif /* elf.h */
diff --git a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
index 2e379cdba6..85f8140330 100644
--- a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
+++ b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
@@ -1,4 +1,4 @@
1From 2f94d488bf3daaa6a8548ee77120fc2506a9bbe3 Mon Sep 17 00:00:00 2001 1From 934d21dc0b06b95c7c65cb29c5096decd91d4d5f Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:19:48 +0800 3Date: Fri, 23 Aug 2019 10:19:48 +0800
4Subject: [PATCH] musl-utils 4Subject: [PATCH] musl-utils
@@ -57,7 +57,7 @@ index 2c6d91b..608646e 100644
57 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; 57 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
58 58
59diff --git a/src/strip.c b/src/strip.c 59diff --git a/src/strip.c b/src/strip.c
60index 70fc8c0..d035d9e 100644 60index d5b753d..d6e1b64 100644
61--- a/src/strip.c 61--- a/src/strip.c
62+++ b/src/strip.c 62+++ b/src/strip.c
63@@ -46,6 +46,13 @@ 63@@ -46,6 +46,13 @@
@@ -75,7 +75,7 @@ index 70fc8c0..d035d9e 100644
75 75
76 /* Name and version of program. */ 76 /* Name and version of program. */
77diff --git a/src/unstrip.c b/src/unstrip.c 77diff --git a/src/unstrip.c b/src/unstrip.c
78index e488e81..0e44456 100644 78index aacc9aa..5e71290 100644
79--- a/src/unstrip.c 79--- a/src/unstrip.c
80+++ b/src/unstrip.c 80+++ b/src/unstrip.c
81@@ -52,6 +52,15 @@ 81@@ -52,6 +52,15 @@
diff --git a/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch b/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
deleted file mode 100644
index 2fa60c333c..0000000000
--- a/meta/recipes-devtools/elfutils/files/0004-Fix-error-on-musl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 72819106d0e5666d172d39c24c19e4e7a3b8be0e Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Wed, 1 May 2019 22:15:03 +0100
4Subject: [PATCH] Fix error on musl:
5
6| ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main':
7| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'?
8| fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS);
9| ^~~~~~~~
10| EPERM
11| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: note: each undeclared identifier is reported only once for each function it appears in
12
13Upstream-Status: Inappropriate [workaround in musl]
14
15Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
16
17---
18 tests/elfstrmerge.c | 5 +++++
19 1 file changed, 5 insertions(+)
20
21diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
22index 197c6a5..3683672 100644
23--- a/tests/elfstrmerge.c
24+++ b/tests/elfstrmerge.c
25@@ -33,6 +33,11 @@
26 #include ELFUTILS_HEADER(dwelf)
27 #include "elf-knowledge.h"
28
29+/* for musl */
30+#ifndef ALLPERMS
31+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
32+#endif
33+
34 /* The original ELF file. */
35 static int fd = -1;
36 static Elf *elf = NULL;
diff --git a/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch b/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
index 5cd6fffc27..c96cfd9777 100644
--- a/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
+++ b/meta/recipes-devtools/elfutils/files/0015-config-eu.am-do-not-use-Werror.patch
@@ -1,4 +1,4 @@
1From cfced441d4a6f2eca51d29c52240275bd6f54e49 Mon Sep 17 00:00:00 2001 1From a2ce41e91d530459eb35d64a19f714ebfe0d4a20 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 22 Jun 2020 21:35:16 +0000 3Date: Mon, 22 Jun 2020 21:35:16 +0000
4Subject: [PATCH] config/eu.am: do not use -Werror 4Subject: [PATCH] config/eu.am: do not use -Werror
@@ -16,10 +16,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
16 1 file changed, 2 deletions(-) 16 1 file changed, 2 deletions(-)
17 17
18diff --git a/config/eu.am b/config/eu.am 18diff --git a/config/eu.am b/config/eu.am
19index 2c3e457..8fb0411 100644 19index 58cd3c4..ac42390 100644
20--- a/config/eu.am 20--- a/config/eu.am
21+++ b/config/eu.am 21+++ b/config/eu.am
22@@ -89,7 +89,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ 22@@ -91,7 +91,6 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
23 -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \ 23 -Wold-style-definition -Wstrict-prototypes $(TRAMPOLINES_WARNING) \
24 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ 24 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
25 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ 25 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
@@ -27,7 +27,7 @@ index 2c3e457..8fb0411 100644
27 $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ 27 $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
28 $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ 28 $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
29 $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \ 29 $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
30@@ -99,7 +98,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \ 30@@ -101,7 +100,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
31 $(TRAMPOLINES_WARNING) \ 31 $(TRAMPOLINES_WARNING) \
32 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \ 32 $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
33 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \ 33 $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
diff --git a/meta/recipes-devtools/elfutils/files/glibc-2.34-fix.patch b/meta/recipes-devtools/elfutils/files/glibc-2.34-fix.patch
deleted file mode 100644
index 9509fb4e77..0000000000
--- a/meta/recipes-devtools/elfutils/files/glibc-2.34-fix.patch
+++ /dev/null
@@ -1,138 +0,0 @@
1glibc 2.34 calls pthread_kill from the raise function. Before raise
2directly called the (tg)kill syscall. So allow pthread_kill to be the
3first frame in a backtrace where raise is expected. Also change some
4asserts to fprintf plus abort to make it more clear why the testcase
5fails.
6
7https://sourceware.org/bugzilla/show_bug.cgi?id=28190
8
9Signed-off-by: Mark Wielaard <mark@klomp.org>
10Upstream-Status: Submitted [https://sourceware.org/pipermail/elfutils-devel/2021q3/004019.html]
11---
12 tests/ChangeLog | 6 +++++
13 tests/backtrace.c | 62 +++++++++++++++++++++++++++++++++++++++++------
14 2 files changed, 61 insertions(+), 7 deletions(-)
15
16Index: elfutils-0.185/tests/ChangeLog
17===================================================================
18--- elfutils-0.185.orig/tests/ChangeLog
19+++ elfutils-0.185/tests/ChangeLog
20@@ -1,3 +1,9 @@
21+2021-08-04 Mark Wielaard <mark@klomp.org>
22+
23+ PR28190
24+ * backtrace.c (callback_verify): Check for pthread_kill as first
25+ frame. Change asserts to fprintf plus abort.
26+
27 2021-05-14 Frank Ch. Eigler <fche@redhat.com>
28
29 PR27859
30Index: elfutils-0.185/tests/backtrace.c
31===================================================================
32--- elfutils-0.185.orig/tests/backtrace.c
33+++ elfutils-0.185/tests/backtrace.c
34@@ -97,6 +97,9 @@ callback_verify (pid_t tid, unsigned fra
35 static bool reduce_frameno = false;
36 if (reduce_frameno)
37 frameno--;
38+ static bool pthread_kill_seen = false;
39+ if (pthread_kill_seen)
40+ frameno--;
41 if (! use_raise_jmp_patching && frameno >= 2)
42 frameno += 2;
43 const char *symname2 = NULL;
44@@ -107,11 +110,26 @@ callback_verify (pid_t tid, unsigned fra
45 && (strcmp (symname, "__kernel_vsyscall") == 0
46 || strcmp (symname, "__libc_do_syscall") == 0))
47 reduce_frameno = true;
48+ else if (! pthread_kill_seen && symname
49+ && strstr (symname, "pthread_kill") != NULL)
50+ pthread_kill_seen = true;
51 else
52- assert (symname && strcmp (symname, "raise") == 0);
53+ {
54+ if (!symname || strcmp (symname, "raise") != 0)
55+ {
56+ fprintf (stderr,
57+ "case 0: expected symname 'raise' got '%s'\n", symname);
58+ abort ();
59+ }
60+ }
61 break;
62 case 1:
63- assert (symname != NULL && strcmp (symname, "sigusr2") == 0);
64+ if (symname == NULL || strcmp (symname, "sigusr2") != 0)
65+ {
66+ fprintf (stderr,
67+ "case 1: expected symname 'sigusr2' got '%s'\n", symname);
68+ abort ();
69+ }
70 break;
71 case 2: // x86_64 only
72 /* __restore_rt - glibc maybe does not have to have this symbol. */
73@@ -120,11 +138,21 @@ callback_verify (pid_t tid, unsigned fra
74 if (use_raise_jmp_patching)
75 {
76 /* Verify we trapped on the very first instruction of jmp. */
77- assert (symname != NULL && strcmp (symname, "jmp") == 0);
78+ if (symname == NULL || strcmp (symname, "jmp") != 0)
79+ {
80+ fprintf (stderr,
81+ "case 3: expected symname 'raise' got '%s'\n", symname);
82+ abort ();
83+ }
84 mod = dwfl_addrmodule (dwfl, pc - 1);
85 if (mod)
86 symname2 = dwfl_module_addrname (mod, pc - 1);
87- assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
88+ if (symname2 == NULL || strcmp (symname2, "jmp") != 0)
89+ {
90+ fprintf (stderr,
91+ "case 3: expected symname2 'jmp' got '%s'\n", symname2);
92+ abort ();
93+ }
94 break;
95 }
96 FALLTHROUGH;
97@@ -137,11 +165,22 @@ callback_verify (pid_t tid, unsigned fra
98 duplicate_sigusr2 = true;
99 break;
100 }
101- assert (symname != NULL && strcmp (symname, "stdarg") == 0);
102+ if (symname == NULL || strcmp (symname, "stdarg") != 0)
103+ {
104+ fprintf (stderr,
105+ "case 4: expected symname 'stdarg' got '%s'\n", symname);
106+ abort ();
107+ }
108 break;
109 case 5:
110 /* Verify we trapped on the very last instruction of child. */
111- assert (symname != NULL && strcmp (symname, "backtracegen") == 0);
112+ if (symname == NULL || strcmp (symname, "backtracegen") != 0)
113+ {
114+ fprintf (stderr,
115+ "case 5: expected symname 'backtracegen' got '%s'\n",
116+ symname);
117+ abort ();
118+ }
119 mod = dwfl_addrmodule (dwfl, pc);
120 if (mod)
121 symname2 = dwfl_module_addrname (mod, pc);
122@@ -151,7 +190,15 @@ callback_verify (pid_t tid, unsigned fra
123 // instructions or even inserts some padding instructions at the end
124 // (which apparently happens on ppc64).
125 if (use_raise_jmp_patching)
126- assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0);
127+ {
128+ if (symname2 != NULL && strcmp (symname2, "backtracegen") == 0)
129+ {
130+ fprintf (stderr,
131+ "use_raise_jmp_patching didn't expect symname2 "
132+ "'backtracegen'\n");
133+ abort ();
134+ }
135+ }
136 break;
137 }
138 }