SHA256
1
0
forked from pool/elfutils

Accepting request 701262 from Base:System

- Add gcc9-tests-Don-t-printf-a-known-NULL-symname.patch in order to
  fix boo#1120864. (forwarded request 701234 from marxin)

OBS-URL: https://build.opensuse.org/request/show/701262
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/elfutils?expand=0&rev=72
This commit is contained in:
Dominique Leuenberger 2019-05-12 09:31:44 +00:00 committed by Git OBS Bridge
commit 866c5b8036
3 changed files with 38 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 7 07:49:14 UTC 2019 - Martin Liška <mliska@suse.cz>
- 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 <mliska@suse.cz> Tue Feb 19 10:22:29 UTC 2019 - Martin Liška <mliska@suse.cz>

View File

@ -33,6 +33,7 @@ Source3: %{name}.changes
Source5: %{name}.keyring Source5: %{name}.keyring
Patch1: disable-tests-with-ptrace.patch Patch1: disable-tests-with-ptrace.patch
Patch2: cfi-fix.patch Patch2: cfi-fix.patch
Patch3: gcc9-tests-Don-t-printf-a-known-NULL-symname.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -137,6 +138,7 @@ applications that require libdw.
%patch1 -p1 %patch1 -p1
%endif %endif
%patch2 -p1 %patch2 -p1
%patch3 -p1
%build %build
# Change DATE/TIME macros to use last change time of elfutils.changes # Change DATE/TIME macros to use last change time of elfutils.changes

View File

@ -0,0 +1,30 @@
From 6978871366465aac849a303b2ea05ff5ab602261 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
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 <mark@klomp.org>
---
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 ?: "<null>");
pid_t tid = dwfl_thread_tid (thread);
callback_verify (tid, *framenop, pc, symname, dwfl);
(*framenop)++;
--
2.21.0