import elfutils-0.182-3.el8

This commit is contained in:
CentOS Sources 2020-12-21 08:10:13 +00:00 committed by Andrew Lukoshko
parent 121d074cae
commit 624e43d1f5
2 changed files with 45 additions and 3 deletions

View File

@ -0,0 +1,39 @@
commit e4d985a3c1c873f77d20fa0cd421458cc2824996
Author: Andreas Krebbel <krebbel@linux.ibm.com>
Date: Thu Nov 19 20:32:24 2020 +0100
IBM Z: Fix endianess problem in pid_memory_read
The cached reads lack the big endian adjustments done in the fallback
path.
Signed-off-by: Andreas Krebbel <krebbel@linux.ibm.com>
diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
index 3a6af997..b23139d9 100644
--- a/libdwfl/linux-pid-attach.c
+++ b/libdwfl/linux-pid-attach.c
@@ -193,14 +193,22 @@ pid_memory_read (Dwfl *dwfl, Dwarf_Addr addr, Dwarf_Word *result, void *arg)
{
struct __libdwfl_pid_arg *pid_arg = arg;
pid_t tid = pid_arg->tid_attached;
+ Dwfl_Process *process = dwfl->process;
assert (tid > 0);
#ifdef HAVE_PROCESS_VM_READV
if (read_cached_memory (pid_arg, addr, result))
+ {
+#if SIZEOF_LONG == 8
+# if BYTE_ORDER == BIG_ENDIAN
+ if (ebl_get_elfclass (process->ebl) == ELFCLASS32)
+ *result >>= 32;
+# endif
+#endif
return true;
+ }
#endif
- Dwfl_Process *process = dwfl->process;
if (ebl_get_elfclass (process->ebl) == ELFCLASS64)
{
#if SIZEOF_LONG == 8

View File

@ -1,6 +1,6 @@
Name: elfutils
Version: 0.182
%global baserelease 2
%global baserelease 3
Release: %{baserelease}%{?dist}
URL: http://elfutils.org/
%global source_url ftp://sourceware.org/pub/elfutils/%{version}/
@ -57,8 +57,8 @@ BuildRequires: curl
%endif
# Patches
Patch1: elfutils-0.182-debuginfod-test-fix.patch
Patch2: elfutils-0.182-s390-pid_memory_read.patch
%description
Elfutils is a collection of utilities, including stack (to show
@ -250,8 +250,8 @@ such servers to download those files on demand.
%setup -q
# Apply patches
%patch1 -p1 -b .debuginfod_test_fix
%patch2 -p1
# In case the above patches added any new test scripts, make sure they
# are executable.
@ -433,6 +433,9 @@ exit 0
%systemd_postun_with_restart debuginfod.service
%changelog
* Thu Dec 17 2020 Mark Wielaard <mjw@redhat.com> - 0.182-3
- Add elfutils-0.182-s390-pid_memory_read.patch
* Mon Nov 2 2020 Mark Wielaard <mjw@redhat.com> - 0.182-2
- Add elfutils-0.182-debuginfod-test-fix.patch.