From de7a086ef34c1316e53d4565406be8a818b47751 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Dec 13 2020 22:11:18 +0000 Subject: 3.16.1-9 - Add valgrind-3.16.1-stxsibx-stxsihx.patch --- diff --git a/valgrind-3.16.1-stxsibx-stxsihx.patch b/valgrind-3.16.1-stxsibx-stxsihx.patch new file mode 100644 index 0000000..c94ad91 --- /dev/null +++ b/valgrind-3.16.1-stxsibx-stxsihx.patch @@ -0,0 +1,63 @@ +diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c +index c9c058a7a..d726d63de 100644 +--- a/VEX/priv/guest_ppc_toIR.c ++++ b/VEX/priv/guest_ppc_toIR.c +@@ -25671,49 +25671,29 @@ dis_vx_store ( UInt prefix, UInt theInstr ) + + case 0x38D: // stxsibx + { +- IRExpr *stored_word; +- IRTemp byte_to_store = newTemp( Ity_I64 ); ++ IRTemp byte_to_store = newTemp( Ity_I8 ); + + DIP("stxsibx %u,r%u,r%u\n", (UInt)XS, rA_addr, rB_addr); + +- /* Can't store just a byte, need to fetch the word at EA merge data +- * and store. +- */ +- stored_word = load( Ity_I64, mkexpr( EA ) ); +- assign( byte_to_store, binop( Iop_And64, ++ assign( byte_to_store, unop( Iop_64to8, + unop( Iop_V128HIto64, +- mkexpr( vS ) ), +- mkU64( 0xFF ) ) ); ++ mkexpr( vS ) ) ) ); + +- store( mkexpr( EA ), binop( Iop_Or64, +- binop( Iop_And64, +- stored_word, +- mkU64( 0xFFFFFFFFFFFFFF00 ) ), +- mkexpr( byte_to_store ) ) ); ++ store( mkexpr( EA ), mkexpr( byte_to_store ) ); + break; + } + + case 0x3AD: // stxsihx + { +- IRExpr *stored_word; +- IRTemp byte_to_store = newTemp( Ity_I64 ); ++ IRTemp hword_to_store = newTemp( Ity_I16 ); + + DIP("stxsihx %u,r%u,r%u\n", (UInt)XS, rA_addr, rB_addr); + +- /* Can't store just a halfword, need to fetch the word at EA merge data +- * and store. +- */ +- stored_word = load( Ity_I64, mkexpr( EA ) ); +- assign( byte_to_store, binop( Iop_And64, +- unop( Iop_V128HIto64, +- mkexpr( vS ) ), +- mkU64( 0xFFFF ) ) ); ++ assign( hword_to_store, unop( Iop_64to16, ++ unop( Iop_V128HIto64, ++ mkexpr( vS ) ) ) ); + +- store( mkexpr( EA ), binop( Iop_Or64, +- binop( Iop_And64, +- stored_word, +- mkU64( 0xFFFFFFFFFFFF0000 ) ), +- mkexpr( byte_to_store ) ) ); ++ store( mkexpr( EA ), mkexpr( hword_to_store ) ); + break; + } + diff --git a/valgrind.spec b/valgrind.spec index a9bdf32..151f270 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: 8%{?dist} +Release: 9%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -123,6 +123,9 @@ Patch15: valgrind-3.16.1-s390_emit_load_mem.patch # KDE#133812 s390x: z14 vector instructions not implemented Patch16: valgrind-3.16.1-s390x-z14-vector.patch +# KDE#430354 ppc stxsibx and stxsihx instructions write too much data +Patch17: valgrind-3.16.1-stxsibx-stxsihx.patch + BuildRequires: glibc-devel %if %{build_openmpi} @@ -267,6 +270,7 @@ Valgrind User Manual for details. %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 %build # LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto @@ -491,6 +495,9 @@ fi %endif %changelog +* Sun Dec 13 2020 Mark Wielaard - 3.16.1-9 +- Add valgrind-3.16.1-stxsibx-stxsihx.patch + * Thu Dec 3 2020 Mark Wielaard - 3.16.1-8 - Update valgrind-3.16.1-s390x-z14-vector.patch