From fdd2c35490b49aaf9d306f18916393614ca65cc3 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Thu, 11 Mar 2021 20:12:35 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/valgrind.git#aa2330f4901673e106de2a73f337ff9a4fdc430d --- valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch | 72 ++++++++++++++++++++++ valgrind.spec | 10 ++- 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch diff --git a/valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch b/valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch new file mode 100644 index 0000000..14b45d4 --- /dev/null +++ b/valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch @@ -0,0 +1,72 @@ +diff --git a/coregrind/m_debuginfo/d3basics.c b/coregrind/m_debuginfo/d3basics.c +index e1127ffe2..1bc5f8f05 100644 +--- a/coregrind/m_debuginfo/d3basics.c ++++ b/coregrind/m_debuginfo/d3basics.c +@@ -523,6 +523,7 @@ static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, const RegSummary* regs ) + if (regno == 30) { *a = regs->fp; return True; } + # elif defined(VGP_arm64_linux) + if (regno == 31) { *a = regs->sp; return True; } ++ if (regno == 29) { *a = regs->fp; return True; } + # else + # error "Unknown platform" + # endif +diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c +index c4a5ea593..bc2578b37 100644 +--- a/coregrind/m_debuginfo/debuginfo.c ++++ b/coregrind/m_debuginfo/debuginfo.c +@@ -2874,7 +2874,9 @@ UWord evalCfiExpr ( const XArray* exprs, Int ix, + # elif defined(VGA_ppc32) || defined(VGA_ppc64be) \ + || defined(VGA_ppc64le) + # elif defined(VGP_arm64_linux) ++ case Creg_ARM64_SP: return eec->uregs->sp; + case Creg_ARM64_X30: return eec->uregs->x30; ++ case Creg_ARM64_X29: return eec->uregs->x29; + # else + # error "Unsupported arch" + # endif +diff --git a/coregrind/m_debuginfo/priv_storage.h b/coregrind/m_debuginfo/priv_storage.h +index 39456eccb..ae44ca34e 100644 +--- a/coregrind/m_debuginfo/priv_storage.h ++++ b/coregrind/m_debuginfo/priv_storage.h +@@ -415,7 +415,9 @@ typedef + Creg_ARM_R15, + Creg_ARM_R14, + Creg_ARM_R7, ++ Creg_ARM64_SP, + Creg_ARM64_X30, ++ Creg_ARM64_X29, + Creg_S390_IA, + Creg_S390_SP, + Creg_S390_FP, +diff --git a/coregrind/m_debuginfo/readdwarf.c b/coregrind/m_debuginfo/readdwarf.c +index 3996623ed..bcacca4cb 100644 +--- a/coregrind/m_debuginfo/readdwarf.c ++++ b/coregrind/m_debuginfo/readdwarf.c +@@ -2816,7 +2816,12 @@ static Int copy_convert_CfiExpr_tree ( XArray* dstxa, + if (dwreg == srcuc->ra_reg) + return ML_(CfiExpr_CfiReg)( dstxa, Creg_IA_IP ); + # elif defined(VGA_arm64) +- I_die_here; ++ if (dwreg == SP_REG) ++ return ML_(CfiExpr_CfiReg)( dstxa, Creg_ARM64_SP ); ++ if (dwreg == FP_REG) ++ return ML_(CfiExpr_CfiReg)( dstxa, Creg_ARM64_X29 ); ++ if (dwreg == srcuc->ra_reg) ++ return ML_(CfiExpr_CfiReg)( dstxa, Creg_ARM64_X30 ); + # elif defined(VGA_ppc32) || defined(VGA_ppc64be) \ + || defined(VGA_ppc64le) + # else +diff --git a/coregrind/m_debuginfo/storage.c b/coregrind/m_debuginfo/storage.c +index 8667d123f..48a92b402 100644 +--- a/coregrind/m_debuginfo/storage.c ++++ b/coregrind/m_debuginfo/storage.c +@@ -1002,7 +1002,9 @@ static void ppCfiReg ( CfiReg reg ) + case Creg_ARM_R15: VG_(printf)("R15"); break; + case Creg_ARM_R14: VG_(printf)("R14"); break; + case Creg_ARM_R7: VG_(printf)("R7"); break; ++ case Creg_ARM64_SP: VG_(printf)("SP"); break; + case Creg_ARM64_X30: VG_(printf)("X30"); break; ++ case Creg_ARM64_X29: VG_(printf)("X29"); break; + case Creg_MIPS_RA: VG_(printf)("RA"); break; + case Creg_S390_IA: VG_(printf)("IA"); break; + case Creg_S390_SP: VG_(printf)("SP"); break; diff --git a/valgrind.spec b/valgrind.spec index f1e0dff..b53b7ac 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -3,7 +3,7 @@ Summary: Tool for finding memory management bugs in programs Name: %{?scl_prefix}valgrind Version: 3.16.1 -Release: 19%{?dist} +Release: 20%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -154,6 +154,10 @@ Patch24: valgrind-3.16.1-open-proc-self-exe.patch # RHBZ#1927153 -flto makes valgrind report non-existing paths to source files Patch25: valgrind-3.16.1-readdwarf-line.patch +# RHBZ#433898 netresolve: FTBFS in Fedora rawhide/f34 because arm64 valgrind +# KDE#433898 arm64: Handle sp, lr, fp as DwReg in CfiExpr +Patch26: valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch + BuildRequires: make BuildRequires: glibc-devel @@ -308,6 +312,7 @@ Valgrind User Manual for details. %patch23 -p1 %patch24 -p1 %patch25 -p1 +%patch26 -p1 %build # LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto @@ -532,6 +537,9 @@ fi %endif %changelog +* Wed Mar 3 2021 Mark Wielaard - 3.16.1-20 +- Add valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch + * Sun Feb 21 2021 Mark Wielaard - 3.16.1-19 - Add valgrind-3.16.1-readdwarf-line.patch