From a5301888c28a4ca3135b728ff8065121af0b4c1b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 19 Jun 2020 10:29:02 +0200 Subject: [PATCH] 3.16.0-3 - Add valgrind-3.16.0-ppc-L-field.patch --- valgrind-3.16.0-ppc-L-field.patch | 29 +++++++++++++++++++++++++++++ valgrind.spec | 10 +++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 valgrind-3.16.0-ppc-L-field.patch diff --git a/valgrind-3.16.0-ppc-L-field.patch b/valgrind-3.16.0-ppc-L-field.patch new file mode 100644 index 0000000..ee1d225 --- /dev/null +++ b/valgrind-3.16.0-ppc-L-field.patch @@ -0,0 +1,29 @@ +commit fb6f7abcbc92506d302fb18a2c5fc853d2929248 +Author: Carl Love +Date: Tue Jun 9 10:42:03 2020 -0500 + + Power PC Fix extraction of the L field for sync instruction + + The L field is currently a two bit[22:21] field in ISA 3.0. The size of the + L field has changed over time. + + Currently the ISA 3.0 Valgrind sync instruction support code sets the + flag_L for the instruction L field to a five bit value that includes bits + that are marked reserved the sync instruction. This patch fixes the issue for ISA 3.0 + to only setting flag_L the specified two bits. + + Valgrind bugzilla: https://bugs.kde.org/show_bug.cgi?id=422677 + +diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c +index 582c59ec0..c4965a19e 100644 +--- a/VEX/priv/guest_ppc_toIR.c ++++ b/VEX/priv/guest_ppc_toIR.c +@@ -8777,7 +8777,7 @@ static Bool dis_memsync ( UInt theInstr ) + /* X-Form, XL-Form */ + UChar opc1 = ifieldOPC(theInstr); + UInt b11to25 = IFIELD(theInstr, 11, 15); +- UChar flag_L = ifieldRegDS(theInstr); ++ UChar flag_L = IFIELD(theInstr, 21, 2); //ISA 3.0 + UInt b11to20 = IFIELD(theInstr, 11, 10); + UInt M0 = IFIELD(theInstr, 11, 5); + UChar rD_addr = ifieldRegDS(theInstr); diff --git a/valgrind.spec b/valgrind.spec index 6128b10..daf60c6 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.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -93,6 +93,9 @@ Patch5: valgrind-3.16.0-some-stack-protector.patch # Add some -Wl,z,now. Patch6: valgrind-3.16.0-some-Wl-z-now.patch +# KDE#422677 PPC sync instruction L field should only be 2 bits in ISA 3.0 +Patch7: valgrind-3.16.0-ppc-L-field.patch + BuildRequires: glibc-devel %if %{build_openmpi} @@ -224,6 +227,8 @@ Valgrind User Manual for details. %patch6 -p1 %endif +%patch7 -p1 + %build # Some patches (might) touch Makefile.am or configure.ac files. @@ -443,6 +448,9 @@ fi %endif %changelog +* Fri Jun 19 2020 Mark Wielaard - 3.16.0-3 +- Add valgrind-3.16.0-ppc-L-field.patch + * Wed May 27 2020 Mark Wielaard - 3.16.0-2 - Apply stack-protector and -Wl,z,now patches.