From ecab619b565a5f4f2d6a22566ca7e7f4910cf581cea8d46f937478d9c3cbe869 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 7 May 2019 09:47:39 +0000 Subject: [PATCH] Accepting request 701234 from home:marxin:branches:Base:System - Add gcc9-tests-Don-t-printf-a-known-NULL-symname.patch in order to fix boo#1120864. OBS-URL: https://build.opensuse.org/request/show/701234 OBS-URL: https://build.opensuse.org/package/show/Base:System/elfutils?expand=0&rev=127 --- elfutils.changes | 6 ++++ elfutils.spec | 2 ++ ...ts-Don-t-printf-a-known-NULL-symname.patch | 30 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 gcc9-tests-Don-t-printf-a-known-NULL-symname.patch diff --git a/elfutils.changes b/elfutils.changes index f5df862..55bfcb8 100644 --- a/elfutils.changes +++ b/elfutils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 7 07:49:14 UTC 2019 - Martin Liška + +- Add gcc9-tests-Don-t-printf-a-known-NULL-symname.patch in order to + fix boo#1120864. + ------------------------------------------------------------------- Tue Feb 19 10:22:29 UTC 2019 - Martin Liška diff --git a/elfutils.spec b/elfutils.spec index 135baf2..2a1aee2 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -33,6 +33,7 @@ Source3: %{name}.changes Source5: %{name}.keyring Patch1: disable-tests-with-ptrace.patch Patch2: cfi-fix.patch +Patch3: gcc9-tests-Don-t-printf-a-known-NULL-symname.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -137,6 +138,7 @@ applications that require libdw. %patch1 -p1 %endif %patch2 -p1 +%patch3 -p1 %build # Change DATE/TIME macros to use last change time of elfutils.changes diff --git a/gcc9-tests-Don-t-printf-a-known-NULL-symname.patch b/gcc9-tests-Don-t-printf-a-known-NULL-symname.patch new file mode 100644 index 0000000..964da15 --- /dev/null +++ b/gcc9-tests-Don-t-printf-a-known-NULL-symname.patch @@ -0,0 +1,30 @@ +From 6978871366465aac849a303b2ea05ff5ab602261 Mon Sep 17 00:00:00 2001 +From: Mark Wielaard +Date: Tue, 30 Apr 2019 20:36:39 +0200 +Subject: [PATCH] tests: Don't printf a known NULL symname. + +GCC9 on 32bit systems might warn about '%s' directive argument is null +for symname in backtrace.c. Just check whether symname is NULL. + +Signed-off-by: Mark Wielaard +--- + tests/ChangeLog | 4 ++++ + tests/backtrace.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tests/backtrace.c b/tests/backtrace.c +index ecf55830..36c8b8c4 100644 +--- a/tests/backtrace.c ++++ b/tests/backtrace.c +@@ -185,7 +185,7 @@ frame_callback (Dwfl_Frame *state, void *frame_arg) + symname = dwfl_module_addrname (mod, pc_adjusted); + + printf ("#%2d %#" PRIx64 "%4s\t%s\n", *framenop, (uint64_t) pc, +- ! isactivation ? "- 1" : "", symname); ++ ! isactivation ? "- 1" : "", symname ?: ""); + pid_t tid = dwfl_thread_tid (thread); + callback_verify (tid, *framenop, pc, symname, dwfl); + (*framenop)++; +-- +2.21.0 +