From 2ece250cfad7e21df3590ca1f2866d829e08926c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 14 2020 01:20:28 +0000 Subject: import gcc-toolset-10-valgrind-3.16.0-3.el8 --- diff --git a/SOURCES/valgrind-3.16.0-387-float.patch b/SOURCES/valgrind-3.16.0-387-float.patch new file mode 100644 index 0000000..b64866e --- /dev/null +++ b/SOURCES/valgrind-3.16.0-387-float.patch @@ -0,0 +1,64 @@ +commit 6aa4f7e7e76b40c183fb29650540d119ce1b4a4a +Author: Julian Seward +Date: Thu Jun 11 09:01:52 2020 +0200 + + expr_is_guardable, stmt_is_guardable, add_guarded_stmt_to_end_of: handle GetI/PutI cases. + + This fixes #422715. + +diff --git a/VEX/priv/guest_generic_bb_to_IR.c b/VEX/priv/guest_generic_bb_to_IR.c +index 2f204c5b0..0cee970e4 100644 +--- a/VEX/priv/guest_generic_bb_to_IR.c ++++ b/VEX/priv/guest_generic_bb_to_IR.c +@@ -425,6 +425,7 @@ static Bool expr_is_guardable ( const IRExpr* e ) + case Iex_ITE: + case Iex_CCall: + case Iex_Get: ++ case Iex_GetI: + case Iex_Const: + case Iex_RdTmp: + return True; +@@ -450,6 +451,7 @@ static Bool stmt_is_guardable ( const IRStmt* st ) + case Ist_NoOp: + case Ist_IMark: + case Ist_Put: ++ case Ist_PutI: + return True; + // These are definitely not guardable, or at least it's way too much + // hassle to do so. +@@ -506,7 +508,7 @@ static void add_guarded_stmt_to_end_of ( /*MOD*/IRSB* bb, + // Put(offs, e) ==> Put(offs, ITE(guard, e, Get(offs, sizeof(e)))) + // Which when flattened out is: + // t1 = Get(offs, sizeof(e)) +- // t2 = ITE(guard, e, t2) ++ // t2 = ITE(guard, e, t1) + // Put(offs, t2) + Int offset = st->Ist.Put.offset; + IRExpr* e = st->Ist.Put.data; +@@ -519,6 +521,26 @@ static void add_guarded_stmt_to_end_of ( /*MOD*/IRSB* bb, + addStmtToIRSB(bb, IRStmt_Put(offset, IRExpr_RdTmp(t2))); + break; + } ++ case Ist_PutI: { ++ // PutI(descr,ix,bias, e) ==> Put(descr,ix,bias, ITE(guard, e, GetI(descr,ix,bias))) ++ // Which when flattened out is: ++ // t1 = GetI(descr,ix,bias) ++ // t2 = ITE(guard, e, t1) ++ // PutI(descr,ix,bias, t2) ++ IRPutI* details = st->Ist.PutI.details; ++ IRRegArray* descr = details->descr; ++ IRExpr* ix = details->ix; ++ Int bias = details->bias; ++ IRExpr* e = details->data; ++ IRType ty = typeOfIRExpr(bb->tyenv, e); ++ IRTemp t1 = newIRTemp(bb->tyenv, ty); ++ IRTemp t2 = newIRTemp(bb->tyenv, ty); ++ addStmtToIRSB(bb, IRStmt_WrTmp(t1, IRExpr_GetI(descr,ix,bias))); ++ addStmtToIRSB(bb, IRStmt_WrTmp(t2, IRExpr_ITE(IRExpr_RdTmp(guard), ++ e, IRExpr_RdTmp(t1)))); ++ addStmtToIRSB(bb, IRStmt_PutI(mkIRPutI(descr,ix,bias, IRExpr_RdTmp(t2)))); ++ break; ++ } + case Ist_Exit: { + // Exit(xguard, dst, jk, offsIP) + // ==> t1 = And1(xguard, guard) diff --git a/SOURCES/valgrind-3.16.0-ppc-L-field.patch b/SOURCES/valgrind-3.16.0-ppc-L-field.patch new file mode 100644 index 0000000..ee1d225 --- /dev/null +++ b/SOURCES/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/SPECS/valgrind.spec b/SPECS/valgrind.spec index 1fd0a05..1e46d97 100644 --- a/SPECS/valgrind.spec +++ b/SPECS/valgrind.spec @@ -6,7 +6,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/ @@ -96,6 +96,12 @@ 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 + +# KDE#422715 x86: vex: the `impossible' happened: expr_is_guardable +Patch8: valgrind-3.16.0-387-float.patch + BuildRequires: glibc-devel %if %{build_openmpi} @@ -227,6 +233,9 @@ Valgrind User Manual for details. %patch6 -p1 %endif +%patch7 -p1 +%patch8 -p1 + %build # Some patches (might) touch Makefile.am or configure.ac files. @@ -446,6 +455,10 @@ fi %endif %changelog +* Wed Jun 24 2020 Mark Wielaard - 3.16.0-3 +- Add valgrind-3.16.0-ppc-L-field.patch +- Add valgrind-3.16.0-387-float.patch + * Thu May 28 2020 Mark Wielaard - 3.16.0-2 - Apply stack-protector and -Wl,z,now patches.