From 564e480369e273baaf6aec63906097e3ef47cad6 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 18 Jun 2017 13:29:40 +0200 Subject: [PATCH] Add valgrind-3.13.0-ppc64-diag.patch --- valgrind-3.13.0-ppc64-diag.patch | 109 +++++++++++++++++++++++++++++++ valgrind.spec | 5 ++ 2 files changed, 114 insertions(+) create mode 100644 valgrind-3.13.0-ppc64-diag.patch diff --git a/valgrind-3.13.0-ppc64-diag.patch b/valgrind-3.13.0-ppc64-diag.patch new file mode 100644 index 0000000..eba0acb --- /dev/null +++ b/valgrind-3.13.0-ppc64-diag.patch @@ -0,0 +1,109 @@ +diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c +index e16e837..a8d4926 100644 +--- a/VEX/priv/guest_ppc_toIR.c ++++ b/VEX/priv/guest_ppc_toIR.c +@@ -29356,62 +29356,70 @@ DisResult disInstr_PPC_WRK ( + + decode_noF: + vassert(!allow_F); +- vex_printf("disInstr(ppc): found the Floating Point instruction 0x%x that\n" +- "can't be handled by Valgrind on this host. This instruction\n" +- "requires a host that supports Floating Point instructions.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found the Floating Point instruction 0x%x that\n" ++ "can't be handled by Valgrind on this host. This instruction\n" ++ "requires a host that supports Floating Point instructions.\n", ++ theInstr); + goto not_supported; + decode_noV: + vassert(!allow_V); +- vex_printf("disInstr(ppc): found an AltiVec or an e500 instruction 0x%x\n" +- "that can't be handled by Valgrind. If this instruction is an\n" +- "Altivec instruction, Valgrind must be run on a host that supports" +- "AltiVec instructions. If the application was compiled for e500, then\n" +- "unfortunately Valgrind does not yet support e500 instructions.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found an AltiVec or an e500 instruction 0x%x\n" ++ "that can't be handled by Valgrind. If this instruction is an\n" ++ "Altivec instruction, Valgrind must be run on a host that supports" ++ "AltiVec instructions. If the application was compiled for e500, then\n" ++ "unfortunately Valgrind does not yet support e500 instructions.\n", ++ theInstr); + goto not_supported; + decode_noVX: + vassert(!allow_VX); +- vex_printf("disInstr(ppc): found the instruction 0x%x that is defined in the\n" +- "Power ISA 2.06 ABI but can't be handled by Valgrind on this host.\n" +- "This instruction \nrequires a host that supports the ISA 2.06 ABI.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found the instruction 0x%x that is defined in the\n" ++ "Power ISA 2.06 ABI but can't be handled by Valgrind on this host.\n" ++ "This instruction \nrequires a host that supports the ISA 2.06 ABI.\n", ++ theInstr); + goto not_supported; + decode_noFX: + vassert(!allow_FX); +- vex_printf("disInstr(ppc): found the General Purpose-Optional instruction 0x%x\n" +- "that can't be handled by Valgrind on this host. This instruction\n" +- "requires a host that supports the General Purpose-Optional instructions.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found the General Purpose-Optional instruction 0x%x\n" ++ "that can't be handled by Valgrind on this host. This instruction\n" ++ "requires a host that supports the General Purpose-Optional instructions.\n", ++ theInstr); + goto not_supported; + decode_noGX: + vassert(!allow_GX); +- vex_printf("disInstr(ppc): found the Graphics-Optional instruction 0x%x\n" +- "that can't be handled by Valgrind on this host. This instruction\n" +- "requires a host that supports the Graphic-Optional instructions.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found the Graphics-Optional instruction 0x%x\n" ++ "that can't be handled by Valgrind on this host. This instruction\n" ++ "requires a host that supports the Graphic-Optional instructions.\n", ++ theInstr); + goto not_supported; + decode_noDFP: + vassert(!allow_DFP); +- vex_printf("disInstr(ppc): found the decimal floating point (DFP) instruction 0x%x\n" +- "that can't be handled by Valgrind on this host. This instruction\n" +- "requires a host that supports DFP instructions.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found the decimal floating point (DFP) instruction 0x%x\n" ++ "that can't be handled by Valgrind on this host. This instruction\n" ++ "requires a host that supports DFP instructions.\n", ++ theInstr); + goto not_supported; + decode_noP8: + vassert(!allow_isa_2_07); +- vex_printf("disInstr(ppc): found the Power 8 instruction 0x%x that can't be handled\n" +- "by Valgrind on this host. This instruction requires a host that\n" +- "supports Power 8 instructions.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found the Power 8 instruction 0x%x that can't be handled\n" ++ "by Valgrind on this host. This instruction requires a host that\n" ++ "supports Power 8 instructions.\n", ++ theInstr); + goto not_supported; + + decode_noP9: + vassert(!allow_isa_3_0); +- vex_printf("disInstr(ppc): found the Power 9 instruction 0x%x that can't be handled\n" +- "by Valgrind on this host. This instruction requires a host that\n" +- "supports Power 9 instructions.\n", +- theInstr); ++ if (sigill_diag) ++ vex_printf("disInstr(ppc): found the Power 9 instruction 0x%x that can't be handled\n" ++ "by Valgrind on this host. This instruction requires a host that\n" ++ "supports Power 9 instructions.\n", ++ theInstr); + goto not_supported; + + decode_failure: diff --git a/valgrind.spec b/valgrind.spec index 77ccb47..e8c04a9 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -98,6 +98,9 @@ Patch4: valgrind-3.13.0-ppc64-check-no-vsx.patch # KDE#381289 epoll_pwait can have a NULL sigmask. Patch5: valgrind-3.13.0-epoll_pwait.patch +# KDE#381274 powerpc too chatty even with --sigill-diagnostics=no +Patch6: valgrind-3.13.0-ppc64-diag.patch + %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so @@ -217,6 +220,7 @@ Valgrind User Manual for details. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -422,6 +426,7 @@ echo ===============END TESTING=============== * Sat Jun 17 2017 Mark Wielaard - Add valgrind-3.13.0-ppc64-check-no-vsx.patch - Add valgrind-3.13.0-epoll_pwait.patch (#1462258) +- Add valgrind-3.13.0-ppc64-diag.patch * Thu Jun 15 2017 Mark Wielaard - 3.13.0-1 - valgrind 3.13.0 final.