SHA256
1
0
forked from pool/elfutils

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
This commit is contained in:
Richard Biener 2019-05-07 09:47:39 +00:00 committed by Git OBS Bridge
parent dbd065f2d2
commit ecab619b56
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>

View File

@ -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

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