diff --git a/.gitignore b/.gitignore index 22fcc46..3f751b3 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /valgrind-3.11.0.TEST1.tar.bz2 /valgrind-3.11.0.tar.bz2 /valgrind-3.12.0.BETA1.tar.bz2 +/valgrind-3.12.0.RC2.tar.bz2 diff --git a/sources b/sources index 039b7be..fde4c47 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cb91572285f0072861a23ed8531b1829 valgrind-3.12.0.BETA1.tar.bz2 +b057a598b2e7298918308dfc6903c141 valgrind-3.12.0.RC2.tar.bz2 diff --git a/valgrind-3.12-beta1-ldflags.patch b/valgrind-3.12-beta1-ldflags.patch deleted file mode 100644 index 3da70e4..0000000 --- a/valgrind-3.12-beta1-ldflags.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff --git a/exp-bbv/tests/amd64-linux/Makefile.am b/exp-bbv/tests/amd64-linux/Makefile.am -index d3eddb3..7ff8966 100644 ---- a/exp-bbv/tests/amd64-linux/Makefile.am -+++ b/exp-bbv/tests/amd64-linux/Makefile.am -@@ -25,7 +25,7 @@ EXTRA_DIST = \ - - AM_CCASFLAGS += -ffreestanding - --LDFLAGS += -nostartfiles -nodefaultlibs -+AM_LDFLAGS = -nostartfiles -nodefaultlibs - - clone_test_SOURCES = clone_test.S - complex_rep_SOURCES = complex_rep.S -diff --git a/exp-bbv/tests/arm-linux/Makefile.am b/exp-bbv/tests/arm-linux/Makefile.am -index 9b91b28..d06b2d2 100644 ---- a/exp-bbv/tests/arm-linux/Makefile.am -+++ b/exp-bbv/tests/arm-linux/Makefile.am -@@ -16,7 +16,7 @@ EXTRA_DIST = \ - - AM_CCASFLAGS += -ffreestanding -Xassembler -I$(top_srcdir)/exp-bbv/tests - --LDFLAGS += -nostartfiles -nodefaultlibs -+AM_LDFLAGS = -nostartfiles -nodefaultlibs - - ll_SOURCES = ll.S - million_SOURCES = million.S -diff --git a/exp-bbv/tests/ppc32-linux/Makefile.am b/exp-bbv/tests/ppc32-linux/Makefile.am -index 56646f4..691d803 100644 ---- a/exp-bbv/tests/ppc32-linux/Makefile.am -+++ b/exp-bbv/tests/ppc32-linux/Makefile.am -@@ -16,7 +16,7 @@ EXTRA_DIST = \ - - AM_CCASFLAGS += -ffreestanding -m32 -Xassembler -I$(top_srcdir)/exp-bbv/tests - --LDFLAGS += -nostartfiles -nodefaultlibs -m32 -+AM_LDFLAGS = -nostartfiles -nodefaultlibs -m32 - - ll_SOURCES = ll.S - million_SOURCES = million.S -diff --git a/exp-bbv/tests/x86-linux/Makefile.am b/exp-bbv/tests/x86-linux/Makefile.am -index a16061f..96bb562 100644 ---- a/exp-bbv/tests/x86-linux/Makefile.am -+++ b/exp-bbv/tests/x86-linux/Makefile.am -@@ -16,7 +16,7 @@ EXTRA_DIST = \ - - AM_CCASFLAGS += -ffreestanding -Xassembler -I$(top_srcdir)/exp-bbv/tests - --LDFLAGS += @FLAG_M32@ -static -nostartfiles -nodefaultlibs -+AM_LDFLAGS = @FLAG_M32@ -static -nostartfiles -nodefaultlibs - - clone_test_SOURCES = clone_test.S - ll_SOURCES = ll.S -diff --git a/exp-bbv/tests/x86/Makefile.am b/exp-bbv/tests/x86/Makefile.am -index 3857aae..d8be880 100644 ---- a/exp-bbv/tests/x86/Makefile.am -+++ b/exp-bbv/tests/x86/Makefile.am -@@ -18,7 +18,7 @@ EXTRA_DIST = \ - - AM_CCASFLAGS += -ffreestanding - --LDFLAGS += @FLAG_M32@ -static -nostartfiles -nodefaultlibs -+AM_LDFLAGS = @FLAG_M32@ -static -nostartfiles -nodefaultlibs - - complex_rep_SOURCES = complex_rep.S - fldcw_check_SOURCES = fldcw_check.S -Only in valgrind-3.12.0.BETA1: autom4te.cache -diff -ru valgrind-3.12.0.BETA1.orig/exp-bbv/tests/amd64-linux/Makefile.in valgrind-3.12.0.BETA1/exp-bbv/tests/amd64-linux/Makefile.in ---- valgrind-3.12.0.BETA1.orig/exp-bbv/tests/amd64-linux/Makefile.in 2016-10-01 11:56:11.345194588 +0200 -+++ valgrind-3.12.0.BETA1/exp-bbv/tests/amd64-linux/Makefile.in 2016-10-01 11:56:35.620748043 +0200 -@@ -310,7 +310,7 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ --LDFLAGS = @LDFLAGS@ -nostartfiles -nodefaultlibs -+LDFLAGS = @LDFLAGS@ - LDFLAGS_MPI = @LDFLAGS_MPI@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -@@ -610,6 +610,7 @@ - rep_prefix.stderr.exp \ - rep_prefix.vgtest - -+AM_LDFLAGS = -nostartfiles -nodefaultlibs - clone_test_SOURCES = clone_test.S - complex_rep_SOURCES = complex_rep.S - fldcw_check_SOURCES = fldcw_check.S -diff -ru valgrind-3.12.0.BETA1.orig/exp-bbv/tests/arm-linux/Makefile.in valgrind-3.12.0.BETA1/exp-bbv/tests/arm-linux/Makefile.in ---- valgrind-3.12.0.BETA1.orig/exp-bbv/tests/arm-linux/Makefile.in 2016-10-01 11:56:11.344194606 +0200 -+++ valgrind-3.12.0.BETA1/exp-bbv/tests/arm-linux/Makefile.in 2016-10-01 11:56:35.659747325 +0200 -@@ -285,7 +285,7 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ --LDFLAGS = @LDFLAGS@ -nostartfiles -nodefaultlibs -+LDFLAGS = @LDFLAGS@ - LDFLAGS_MPI = @LDFLAGS_MPI@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -@@ -577,6 +577,7 @@ - million.post.exp \ - million.vgtest - -+AM_LDFLAGS = -nostartfiles -nodefaultlibs - ll_SOURCES = ll.S - million_SOURCES = million.S - all: all-am -diff -ru valgrind-3.12.0.BETA1.orig/exp-bbv/tests/ppc32-linux/Makefile.in valgrind-3.12.0.BETA1/exp-bbv/tests/ppc32-linux/Makefile.in ---- valgrind-3.12.0.BETA1.orig/exp-bbv/tests/ppc32-linux/Makefile.in 2016-10-01 11:56:11.344194606 +0200 -+++ valgrind-3.12.0.BETA1/exp-bbv/tests/ppc32-linux/Makefile.in 2016-10-01 11:56:35.698746608 +0200 -@@ -285,7 +285,7 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ --LDFLAGS = @LDFLAGS@ -nostartfiles -nodefaultlibs -m32 -+LDFLAGS = @LDFLAGS@ - LDFLAGS_MPI = @LDFLAGS_MPI@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -@@ -577,6 +577,7 @@ - million.post.exp \ - million.vgtest - -+AM_LDFLAGS = -nostartfiles -nodefaultlibs -m32 - ll_SOURCES = ll.S - million_SOURCES = million.S - all: all-am -diff -ru valgrind-3.12.0.BETA1.orig/exp-bbv/tests/x86/Makefile.in valgrind-3.12.0.BETA1/exp-bbv/tests/x86/Makefile.in ---- valgrind-3.12.0.BETA1.orig/exp-bbv/tests/x86/Makefile.in 2016-10-01 11:56:11.345194588 +0200 -+++ valgrind-3.12.0.BETA1/exp-bbv/tests/x86/Makefile.in 2016-10-01 11:56:35.777745155 +0200 -@@ -294,7 +294,7 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ --LDFLAGS = @LDFLAGS@ @FLAG_M32@ -static -nostartfiles -nodefaultlibs -+LDFLAGS = @LDFLAGS@ - LDFLAGS_MPI = @LDFLAGS_MPI@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -@@ -587,6 +587,7 @@ - rep_prefix.stderr.exp \ - rep_prefix.vgtest - -+AM_LDFLAGS = @FLAG_M32@ -static -nostartfiles -nodefaultlibs - complex_rep_SOURCES = complex_rep.S - fldcw_check_SOURCES = fldcw_check.S - million_SOURCES = million.S -diff -ru valgrind-3.12.0.BETA1.orig/exp-bbv/tests/x86-linux/Makefile.in valgrind-3.12.0.BETA1/exp-bbv/tests/x86-linux/Makefile.in ---- valgrind-3.12.0.BETA1.orig/exp-bbv/tests/x86-linux/Makefile.in 2016-10-01 11:56:11.344194606 +0200 -+++ valgrind-3.12.0.BETA1/exp-bbv/tests/x86-linux/Makefile.in 2016-10-01 11:56:35.737745891 +0200 -@@ -285,7 +285,7 @@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ - INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ --LDFLAGS = @LDFLAGS@ @FLAG_M32@ -static -nostartfiles -nodefaultlibs -+LDFLAGS = @LDFLAGS@ - LDFLAGS_MPI = @LDFLAGS_MPI@ - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ -@@ -577,6 +577,7 @@ - ll.post.exp \ - ll.vgtest - -+AM_LDFLAGS = @FLAG_M32@ -static -nostartfiles -nodefaultlibs - clone_test_SOURCES = clone_test.S - ll_SOURCES = ll.S - all: all-am diff --git a/valgrind-3.12-beta1-ppc64be.patch b/valgrind-3.12-beta1-ppc64be.patch deleted file mode 100644 index 88f01b1..0000000 --- a/valgrind-3.12-beta1-ppc64be.patch +++ /dev/null @@ -1,465 +0,0 @@ -From 8ba68463102c2ae537b27e8fd6ea6d6777ed7bb1 Mon Sep 17 00:00:00 2001 -From: Carl Love -Date: Wed, 28 Sep 2016 12:16:14 -0400 -Subject: [PATCH] Fix for clean helpers on BE - -This patch adds the missing fnptr_to_fnentry() wrapper call for the -clean helpers introduced in the ISA 3.0 support. - -Signed-off-by: Carl Love ---- - VEX/priv/guest_ppc_helpers.c | 5 +++ - VEX/priv/guest_ppc_toIR.c | 105 ++++++++++++++++++++++++++----------------- - 2 files changed, 68 insertions(+), 42 deletions(-) - -diff --git a/VEX/priv/guest_ppc_helpers.c b/VEX/priv/guest_ppc_helpers.c -index 1d79eed..0a4a31c 100644 ---- a/VEX/priv/guest_ppc_helpers.c -+++ b/VEX/priv/guest_ppc_helpers.c -@@ -220,6 +220,11 @@ IRExpr* guest_ppc64_spechelper ( const HChar* function_name, - /*--- Misc BCD clean helpers. ---*/ - /*---------------------------------------------------------------*/ - -+/* NOTE, the clean and dirty helpers need to called using the -+ * fnptr_to_fnentry() function wrapper to handle the Big Endian -+ * pointer-to-function ABI and the Little Endian ABI. -+ */ -+ - /* This C-helper takes a 128-bit BCD value as two 64-bit pieces. - * It checks the string to see if it is a valid 128-bit BCD value. - * A valid BCD value has a sign value in bits [3:0] between 0xA -diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c -index 6bd6e8f..712d2d5 100644 ---- a/VEX/priv/guest_ppc_toIR.c -+++ b/VEX/priv/guest_ppc_toIR.c -@@ -4321,7 +4321,8 @@ static IRExpr * CmpGT128U ( IRExpr *src1, IRExpr *src2 ) - } - - --static IRExpr * is_BCDstring128 (UInt Signed, IRExpr *src) -+static IRExpr * is_BCDstring128 ( const VexAbiInfo* vbi, -+ UInt Signed, IRExpr *src ) - { - - IRTemp valid = newTemp( Ity_I64 ); -@@ -4338,7 +4339,7 @@ static IRExpr * is_BCDstring128 (UInt Signed, IRExpr *src) - assign( valid, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "is_BCDstring128_helper", -- &is_BCDstring128_helper, -+ fnptr_to_fnentry( vbi, &is_BCDstring128_helper ), - mkIRExprVec_3( mkU64( Signed ), - unop( Iop_V128HIto64, src ), - unop( Iop_V128to64, src ) ) ) ); -@@ -4383,7 +4384,8 @@ static IRExpr * check_BCD_round (IRExpr *src, IRTemp shift) - mkU64( 0xF ) ) ); - } - --static IRTemp increment_BCDstring (IRExpr *src, IRExpr *carry_in) -+static IRTemp increment_BCDstring ( const VexAbiInfo* vbi, -+ IRExpr *src, IRExpr *carry_in ) - { - /* The src is a 128-bit value containing 31 BCD digits with the sign in - * the least significant byte. The bytes are BCD values between 0x0 and 0x9. -@@ -4418,7 +4420,8 @@ static IRTemp increment_BCDstring (IRExpr *src, IRExpr *carry_in) - assign( bcd_result0, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "increment_BCDstring32_helper", -- &increment_BCDstring32_helper, -+ fnptr_to_fnentry( vbi, -+ &increment_BCDstring32_helper ), - mkIRExprVec_3( mkU64( True /*Signed*/ ), - bcd_string0, - binop( Iop_32HLto64, mkU32( 0 ), -@@ -4427,7 +4430,8 @@ static IRTemp increment_BCDstring (IRExpr *src, IRExpr *carry_in) - assign( bcd_result1, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "increment_BCDstring32_helper", -- &increment_BCDstring32_helper, -+ fnptr_to_fnentry( vbi, -+ &increment_BCDstring32_helper ), - mkIRExprVec_3( mkU64( False /*Unsigned*/ ), - bcd_string1, - binop( Iop_Shr64, -@@ -4436,7 +4440,8 @@ static IRTemp increment_BCDstring (IRExpr *src, IRExpr *carry_in) - assign( bcd_result2, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "increment_BCDstring32_helper", -- &increment_BCDstring32_helper, -+ fnptr_to_fnentry( vbi, -+ &increment_BCDstring32_helper ), - mkIRExprVec_3( mkU64( False /*Unsigned*/ ), - bcd_string2, - binop( Iop_Shr64, -@@ -4445,7 +4450,8 @@ static IRTemp increment_BCDstring (IRExpr *src, IRExpr *carry_in) - assign( bcd_result3, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "increment_BCDstring32_helper", -- &increment_BCDstring32_helper, -+ fnptr_to_fnentry( vbi, -+ &increment_BCDstring32_helper ), - mkIRExprVec_3( mkU64( False /*Unsigned*/ ), - bcd_string3, - binop( Iop_Shr64, -@@ -4470,7 +4476,8 @@ static IRTemp increment_BCDstring (IRExpr *src, IRExpr *carry_in) - return bcd_result; - } - --static IRExpr * convert_to_zoned ( IRExpr *src, IRExpr *upper_byte ) -+static IRExpr * convert_to_zoned ( const VexAbiInfo* vbi, -+ IRExpr *src, IRExpr *upper_byte ) - { - /* The function takes a V128 packed decimal value and returns - * the value in zoned format. Note, the sign of the value is ignored. -@@ -4486,7 +4493,7 @@ static IRExpr * convert_to_zoned ( IRExpr *src, IRExpr *upper_byte ) - assign( result_low, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "convert_to_zoned_helper", -- &convert_to_zoned_helper, -+ fnptr_to_fnentry( vbi, &convert_to_zoned_helper ), - mkIRExprVec_4( unop( Iop_V128HIto64, src ), - unop( Iop_V128to64, src ), - upper_byte, -@@ -4495,7 +4502,7 @@ static IRExpr * convert_to_zoned ( IRExpr *src, IRExpr *upper_byte ) - assign( result_hi, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "convert_to_zoned_helper", -- &convert_to_zoned_helper, -+ fnptr_to_fnentry( vbi, &convert_to_zoned_helper ), - mkIRExprVec_4( unop( Iop_V128HIto64, src ), - unop( Iop_V128to64, src ), - upper_byte, -@@ -4508,7 +4515,7 @@ static IRExpr * convert_to_zoned ( IRExpr *src, IRExpr *upper_byte ) - return mkexpr( result ); - } - --static IRExpr * convert_to_national ( IRExpr *src ) { -+static IRExpr * convert_to_national ( const VexAbiInfo* vbi, IRExpr *src ) { - /* The function takes 128-bit value which has a 64-bit packed decimal - * value in the lower 64-bits of the source. The packed decimal is - * converted to the national format via a clean helper. The clean -@@ -4528,14 +4535,14 @@ static IRExpr * convert_to_national ( IRExpr *src ) { - assign( result_low, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "convert_to_national_helper", -- &convert_to_national_helper, -+ fnptr_to_fnentry( vbi, &convert_to_national_helper ), - mkIRExprVec_2( unop( Iop_V128to64, src ), - mkU64( 0 ) ) ) ); - - assign( result_hi, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "convert_to_national_helper", -- &convert_to_national_helper, -+ fnptr_to_fnentry( vbi, &convert_to_national_helper ), - mkIRExprVec_2( unop( Iop_V128to64, src ), - mkU64( 1 ) ) ) ); - -@@ -4545,7 +4552,7 @@ static IRExpr * convert_to_national ( IRExpr *src ) { - return mkexpr( result ); - } - --static IRExpr * convert_from_zoned ( IRExpr *src ) { -+static IRExpr * convert_from_zoned ( const VexAbiInfo* vbi, IRExpr *src ) { - /* The function takes 128-bit zoned value and returns a signless 64-bit - * packed decimal value in the lower 64-bits of the 128-bit result. - */ -@@ -4557,7 +4564,8 @@ static IRExpr * convert_from_zoned ( IRExpr *src ) { - mkU64( 0 ), - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "convert_from_zoned_helper", -- &convert_from_zoned_helper, -+ fnptr_to_fnentry( vbi, -+ &convert_from_zoned_helper ), - mkIRExprVec_2( unop( Iop_V128HIto64, - src ), - unop( Iop_V128to64, -@@ -4567,7 +4575,7 @@ static IRExpr * convert_from_zoned ( IRExpr *src ) { - return mkexpr( result ); - } - --static IRExpr * convert_from_national ( IRExpr *src ) { -+static IRExpr * convert_from_national ( const VexAbiInfo* vbi, IRExpr *src ) { - /* The function takes 128-bit national value and returns a 64-bit - * packed decimal value. - */ -@@ -4576,7 +4584,8 @@ static IRExpr * convert_from_national ( IRExpr *src ) { - assign( result, - mkIRExprCCall( Ity_I64, 0 /*regparms*/, - "convert_from_national_helper", -- &convert_from_national_helper, -+ fnptr_to_fnentry( vbi, -+ &convert_from_national_helper ), - mkIRExprVec_2( unop( Iop_V128HIto64, - src ), - unop( Iop_V128to64, -@@ -22076,7 +22085,7 @@ static Bool dis_av_load ( const VexAbiInfo* vbi, UInt theInstr ) - d = unsafeIRDirty_0_N ( - 0/*regparms*/, - "ppc64g_dirtyhelper_LVS", -- &ppc64g_dirtyhelper_LVS, -+ fnptr_to_fnentry( vbi, &ppc64g_dirtyhelper_LVS ), - args_le ); - } - DIP("lvsl v%d,r%u,r%u\n", vD_addr, rA_addr, rB_addr); -@@ -22126,7 +22135,7 @@ static Bool dis_av_load ( const VexAbiInfo* vbi, UInt theInstr ) - d = unsafeIRDirty_0_N ( - 0/*regparms*/, - "ppc64g_dirtyhelper_LVS", -- &ppc64g_dirtyhelper_LVS, -+ fnptr_to_fnentry( vbi, &ppc64g_dirtyhelper_LVS ), - args_le ); - } - DIP("lvsr v%d,r%u,r%u\n", vD_addr, rA_addr, rB_addr); -@@ -25035,7 +25044,7 @@ static IRExpr * bcd_sign_code_adjust( UInt ps, IRExpr * tmp) - except when an overflow occurs. But since we can't be 100% accurate - in our emulation of CR6, it seems best to just not support it all. - */ --static Bool dis_av_bcd_misc ( UInt theInstr ) -+static Bool dis_av_bcd_misc ( UInt theInstr, const VexAbiInfo* vbi ) - { - UChar opc1 = ifieldOPC(theInstr); - UChar vRT_addr = ifieldRegDS(theInstr); -@@ -25087,8 +25096,10 @@ static Bool dis_av_bcd_misc ( UInt theInstr ) - valid = - unop( Iop_64to32, - binop( Iop_And64, -- is_BCDstring128( /*Signed*/True, mkexpr( vA ) ), -- is_BCDstring128( /*Signed*/True, mkexpr( vB ) ) ) ); -+ is_BCDstring128( vbi, -+ /*Signed*/True, mkexpr( vA ) ), -+ is_BCDstring128( vbi, -+ /*Signed*/True, mkexpr( vB ) ) ) ); - - sign_vb = binop( Iop_AndV128, - binop( Iop_64HLtoV128, -@@ -25149,7 +25160,7 @@ static Bool dis_av_bcd_misc ( UInt theInstr ) - return True; - } - --static Bool dis_av_bcd ( UInt theInstr ) -+static Bool dis_av_bcd ( UInt theInstr, const VexAbiInfo* vbi ) - { - /* VX-Form */ - UChar opc1 = ifieldOPC(theInstr); -@@ -25221,8 +25232,10 @@ static Bool dis_av_bcd ( UInt theInstr ) - valid = - unop( Iop_64to32, - binop( Iop_And64, -- is_BCDstring128( /* Signed */True, mkexpr( vA ) ), -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ) ); -+ is_BCDstring128( vbi, -+ /* Signed */True, mkexpr( vA ) ), -+ is_BCDstring128( vbi, -+ /* Signed */True, mkexpr( vB ) ) ) ); - - /* src A */ - zeroA = BCDstring_zero( binop( Iop_AndV128, -@@ -25440,7 +25453,7 @@ static Bool dis_av_bcd ( UInt theInstr ) - - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Signed */True, mkexpr( vB ) ) ); - - } else { - /* string is an unsigned BCD value */ -@@ -25450,7 +25463,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Unsigned */False, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Unsigned */False, -+ mkexpr( vB ) ) ); - } - - /* if PS = 0 -@@ -25507,7 +25521,7 @@ static Bool dis_av_bcd ( UInt theInstr ) - new_sign_val ), - binop( Iop_AndV128, - not_excess_shift_mask, -- mkexpr( increment_BCDstring( result, -+ mkexpr( increment_BCDstring( vbi, result, - mkexpr( round) - ) ) ) ) ); - } else { // bcdus. -@@ -25623,7 +25637,7 @@ static Bool dis_av_bcd ( UInt theInstr ) - } - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Signed */True, mkexpr( vB ) ) ); - - } else { // bcdutrunc. - /* Check if all of the digits are zero */ -@@ -25636,7 +25650,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - pos = mkNOT1( zero ); - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Unsigned */False, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Unsigned */False, -+ mkexpr( vB ) ) ); - } - - /* If vB is not valid, the result is undefined, but we need to -@@ -25708,7 +25723,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - /* Check each of the nibbles for a valid digit 0 to 9 */ - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Signed */True, -+ mkexpr( vB ) ) ); - overflow = mkU1( 0 ); // not used - } - break; -@@ -25863,7 +25879,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - pos = mkAND1( mkNOT1( sign ), mkNOT1( zero ) ); - - assign( tmp, -- convert_to_zoned( mkexpr( vB ), mkU64( upper_byte ) ) ); -+ convert_to_zoned( vbi, mkexpr( vB ), -+ mkU64( upper_byte ) ) ); - - /* Insert the sign based on ps and sign of vB - * in the lower byte. -@@ -25906,7 +25923,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - */ - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Signed */True, -+ mkexpr( vB ) ) ); - } - break; - -@@ -25940,7 +25958,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - */ - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Signed */True, -+ mkexpr( vB ) ) ); - - /* Upper 24 hex digits of VB, i.e. hex ditgits vB[0:23], - * must be zero for the ox_flag to be zero. This goes -@@ -26001,7 +26020,7 @@ static Bool dis_av_bcd ( UInt theInstr ) - pos = mkAND1( mkNOT1( sign ), mkNOT1( zero ) ); - - assign( tmp, -- convert_to_national( mkexpr( vB ) ) ); -+ convert_to_national( vbi, mkexpr( vB ) ) ); - - /* If vB is positive insert sign value 0x002B, otherwise - * insert 0x002D for negative. Have to use sign not neg -@@ -26009,7 +26028,7 @@ static Bool dis_av_bcd ( UInt theInstr ) - * OR'd with (sign << 1 | NOT sign) << 1. - * sign = 1 if vB is negative. - */ -- putVReg(vRT_addr, -+ putVReg( vRT_addr, - binop( Iop_OrV128, - mkexpr( tmp ), - binop( Iop_64HLtoV128, -@@ -26033,7 +26052,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - */ - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Signed */True, -+ mkexpr( vB ) ) ); - - overflow = ox_flag; - } -@@ -26049,7 +26069,7 @@ static Bool dis_av_bcd ( UInt theInstr ) - valid = unop( Iop_1Uto32, is_Zoned_decimal( vB, ps ) ); - - assign( tmp, -- convert_from_zoned( mkexpr( vB ) ) ); -+ convert_from_zoned( vbi, mkexpr( vB ) ) ); - - /* If the result of checking the lower 4 bits of each 8-bit - * value is zero, then the "number" was zero. -@@ -26129,7 +26149,7 @@ static Bool dis_av_bcd ( UInt theInstr ) - /* sign = 1 if vB is negative */ - sign = binop( Iop_CmpEQ64, mkexpr( hword_7 ), mkU64( 0x002D ) ); - -- assign( tmp, convert_from_national( mkexpr( vB ) ) ); -+ assign( tmp, convert_from_national( vbi, mkexpr( vB ) ) ); - - /* If the result of checking the lower 4 bits of each 16-bit - * value is zero, then the "number" was zero. -@@ -26221,7 +26241,8 @@ static Bool dis_av_bcd ( UInt theInstr ) - - valid = - unop( Iop_64to32, -- is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ); -+ is_BCDstring128( vbi, /* Signed */True, -+ mkexpr( vB ) ) ); - - /* if PS = 0 - vB positive, sign is C -@@ -28388,7 +28409,7 @@ DisResult disInstr_PPC_WRK ( - case 0x181: // bcdcfn., bcdcfz. - // bcdctz., bcdcfsq., bcdctsq. - if (!allow_isa_2_07) goto decode_noP8; -- if (dis_av_bcd( theInstr )) goto decode_success; -+ if (dis_av_bcd( theInstr, abiinfo )) goto decode_success; - goto decode_failure; - default: - break; // Fall through... -@@ -28401,7 +28422,7 @@ DisResult disInstr_PPC_WRK ( - case 0x341: // bcdcpsgn - - if (!allow_isa_2_07) goto decode_noP8; -- if (dis_av_bcd_misc( theInstr )) goto decode_success; -+ if (dis_av_bcd_misc( theInstr, abiinfo )) goto decode_success; - goto decode_failure; - - --- -2.1.0 - -Fix the expected output file for jm_int_isa_2_07 - -By convention the file jm_int_isa_2_07.stdout.exp is the big endian reuslts. - -If the little endian results differ, the file has -LE appended to it. - -Signed-off-by: Carl Love ---- - none/tests/ppc64/jm_int_isa_2_07.stdout.exp | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/none/tests/ppc64/jm_int_isa_2_07.stdout.exp b/none/tests/ppc64/jm_int_isa_2_07.stdout.exp -index 5876128..e31b973 100644 ---- a/none/tests/ppc64/jm_int_isa_2_07.stdout.exp -+++ b/none/tests/ppc64/jm_int_isa_2_07.stdout.exp -@@ -1,17 +1,17 @@ --stq abcdef0123456789,1133557722446688, 0 => 1133557722446688,abcdef0123456789) -+stq abcdef0123456789,1133557722446688, 0 => abcdef0123456789,1133557722446688) - --lq (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0xabcdef0123456789, 0xaaccee0011335577) -+lq (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0xaaccee0011335577, 0xabcdef0123456789) - --lbarx (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0x0000000000000077, 0x0000000000000000) -+lbarx (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0x00000000000000aa, 0x0000000000000000) - --lharx (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0x0000000000005577, 0x0000000000000000) -+lharx (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0x000000000000aacc, 0x0000000000000000) - --lqarx (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0xabcdef0123456789, 0xaaccee0011335577) -+lqarx (0xaaccee0011335577, 0xabcdef0123456789) => (reg_pair = 0xaaccee0011335577, 0xabcdef0123456789) - --stbcx. abefcd0145236789,1155337744226688 => 0000000000000089,0000000000000001; CR=20000000 -+stbcx. abefcd0145236789,1155337744226688 => 8900000000000000,0000000000000001; CR=20000000 - --sthcx. abefcd0145236789,1155337744226688 => 0000000000006789,0000000000000001; CR=20000000 -+sthcx. abefcd0145236789,1155337744226688 => 6789000000000000,0000000000000001; CR=20000000 - --stqcx. abefcd0145236789,1155337744226688 => 1155337744226688,abefcd0145236789; CR=20000000 -+stqcx. abefcd0145236789,1155337744226688 => abefcd0145236789,1155337744226688; CR=20000000 - - All done. Tested 8 different instructions --- -1.8.3.1 - diff --git a/valgrind-3.12.0-skip-cond-var.patch b/valgrind-3.12.0-skip-cond-var.patch new file mode 100644 index 0000000..ab15928 --- /dev/null +++ b/valgrind-3.12.0-skip-cond-var.patch @@ -0,0 +1,190 @@ +commit 88cf06207b074f387c04de4938a0bb20366616b0 +Author: mjw +Date: Fri Oct 21 00:02:10 2016 +0000 + + Add libc_test to workaround pth_cond_destroy_busy test hangs. + + This is a workaround for bug #371396. It adds a new test program + that can be used skip tests given a specific libc implementation + and optionally a specific minimum version. Currently only glibc + is recognized. This is used for the drd and helgrind tests + pth_cond_destroy_busy to be skipped on glibc 2.24.90+. + + git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16097 a5019735-40e9-0310-863c-91ae7b9d1cf9 + +diff --git a/drd/tests/pth_cond_destroy_busy.vgtest b/drd/tests/pth_cond_destroy_busy.vgtest +index eafbd74..f3cf778 100644 +--- a/drd/tests/pth_cond_destroy_busy.vgtest ++++ b/drd/tests/pth_cond_destroy_busy.vgtest +@@ -1,2 +1,2 @@ +-prereq: ./supported_libpthread ++prereq: ./supported_libpthread && ! ../../tests/libc_test glibc 2.24.90 + prog: pth_cond_destroy_busy +diff --git a/helgrind/tests/pth_cond_destroy_busy.vgtest b/helgrind/tests/pth_cond_destroy_busy.vgtest +index 45d7853..2957cc3 100644 +--- a/helgrind/tests/pth_cond_destroy_busy.vgtest ++++ b/helgrind/tests/pth_cond_destroy_busy.vgtest +@@ -1,2 +1,2 @@ +-prereq: ! ../../tests/os_test darwin ++prereq: ! ../../tests/os_test darwin && ! ../../tests/libc_test glibc 2.24.90 + prog: ../../drd/tests/pth_cond_destroy_busy +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 9c0cc3a..7233626 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -44,6 +44,7 @@ noinst_HEADERS = \ + check_PROGRAMS = \ + arch_test \ + os_test \ ++ libc_test \ + true \ + x86_amd64_features \ + s390x_features \ +diff --git a/tests/libc_test.c b/tests/libc_test.c +new file mode 100644 +index 0000000..0de3d5d +--- /dev/null ++++ b/tests/libc_test.c +@@ -0,0 +1,78 @@ ++// Compare given libc name and version number to system name and version. ++ ++// Returns ++// - 0 if the libc name matches is at least the minimum version (if given). ++// - 1 if the libc name doesn't match or the version is lower than requested. ++// - 2 if the requested libc name isn't recognised. ++// - 3 if there was a usage error (it also prints an error message). ++ ++#include ++#include ++#include ++ ++#ifdef __GLIBC__ ++#include ++#endif ++ ++#define False 0 ++#define True 1 ++typedef int Bool; ++ ++/* Assumes the versions are x.y.z, with y and z optional. */ ++static Bool matches_version(char *min_version) { ++ int a1=0, a2=0, a3=0, g1=0, g2=0, g3=0; // 'a' = actual; 'g' = given ++ const char *aversion; ++ ++ if (min_version == NULL) return True; // no version specified ++ ++ // get actual version number ++#ifdef __GLIBC__ ++ aversion = gnu_get_libc_version(); ++#else ++ aversion = "unknown"; ++#endif ++ // We expect at least one number. ++ if (sscanf(aversion, "%d.%d.%d", &a1, &a2, &a3) < 1) return False; ++ ++ // parse given version number. ++ if (sscanf(min_version, "%d.%d.%d", &g1, &g2, &g3) < 1) return False; ++ ++ if (a1 > g1) return True; ++ if (a1 < g1) return False; ++ if (a2 > g2) return True; ++ if (a2 < g2) return False; ++ if (a3 >= g3) return True; ++ ++ return False; ++} ++ ++static Bool go(char* libc, char *min_version) ++{ ++#ifdef __GLIBC__ ++ if ( 0 == strcmp( libc, "glibc" ) ++ && matches_version( min_version )) ++ return True; ++#endif ++ ++ return False; ++} ++ ++//--------------------------------------------------------------------------- ++// main ++//--------------------------------------------------------------------------- ++int main(int argc, char **argv) ++{ ++ if ( argc < 2 ) { ++ fprintf( stderr, "usage: libc_test []\n" ); ++ exit(3); // Usage error. ++ } ++ if (go( argv[1], argv[2] )) { ++ return 0; // Matched. ++ } ++ ++ if ( 0 == strcmp ( argv[1], "glibc" ) ) { ++ return 1; // Requested libc name known, but this isn't it. ++ // Or it wasn't the minimum requested version. ++ } ++ return 2; // Didn't match any known libc name. ++} +Only in valgrind-3.12.0.RC2: autom4te.cache +diff -ur valgrind-3.12.0.RC2.orig/tests/Makefile.in valgrind-3.12.0.RC2/tests/Makefile.in +--- valgrind-3.12.0.RC2.orig/tests/Makefile.in 2016-10-21 02:10:24.283643034 +0200 ++++ valgrind-3.12.0.RC2/tests/Makefile.in 2016-10-21 02:11:09.668003685 +0200 +@@ -121,10 +121,11 @@ + @COMPILER_IS_CLANG_TRUE@ -Wno-uninitialized -Wno-unused-value # \ + @COMPILER_IS_CLANG_TRUE@ clang 3.0.0 + @COMPILER_IS_CLANG_TRUE@am__append_7 = -Wno-unused-private-field # drd/tests/tsan_unittest.cpp +-check_PROGRAMS = arch_test$(EXEEXT) os_test$(EXEEXT) true$(EXEEXT) \ +- x86_amd64_features$(EXEEXT) s390x_features$(EXEEXT) \ +- mips_features$(EXEEXT) power_insn_available$(EXEEXT) \ +- is_ppc64_BE$(EXEEXT) min_power_isa$(EXEEXT) ++check_PROGRAMS = arch_test$(EXEEXT) os_test$(EXEEXT) \ ++ libc_test$(EXEEXT) true$(EXEEXT) x86_amd64_features$(EXEEXT) \ ++ s390x_features$(EXEEXT) mips_features$(EXEEXT) \ ++ power_insn_available$(EXEEXT) is_ppc64_BE$(EXEEXT) \ ++ min_power_isa$(EXEEXT) + subdir = tests + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac +@@ -142,6 +143,9 @@ + is_ppc64_BE_SOURCES = is_ppc64_BE.c + is_ppc64_BE_OBJECTS = is_ppc64_BE.$(OBJEXT) + is_ppc64_BE_LDADD = $(LDADD) ++libc_test_SOURCES = libc_test.c ++libc_test_OBJECTS = libc_test.$(OBJEXT) ++libc_test_LDADD = $(LDADD) + min_power_isa_SOURCES = min_power_isa.c + min_power_isa_OBJECTS = min_power_isa-min_power_isa.$(OBJEXT) + min_power_isa_LDADD = $(LDADD) +@@ -201,10 +205,10 @@ + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) + am__v_CCLD_0 = @echo " CCLD " $@; + am__v_CCLD_1 = +-SOURCES = arch_test.c is_ppc64_BE.c min_power_isa.c mips_features.c \ +- os_test.c power_insn_available.c s390x_features.c true.c \ +- x86_amd64_features.c +-DIST_SOURCES = arch_test.c is_ppc64_BE.c min_power_isa.c \ ++SOURCES = arch_test.c is_ppc64_BE.c libc_test.c min_power_isa.c \ ++ mips_features.c os_test.c power_insn_available.c \ ++ s390x_features.c true.c x86_amd64_features.c ++DIST_SOURCES = arch_test.c is_ppc64_BE.c libc_test.c min_power_isa.c \ + mips_features.c os_test.c power_insn_available.c \ + s390x_features.c true.c x86_amd64_features.c + am__can_run_installinfo = \ +@@ -681,6 +685,10 @@ + @rm -f is_ppc64_BE$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(is_ppc64_BE_OBJECTS) $(is_ppc64_BE_LDADD) $(LIBS) + ++libc_test$(EXEEXT): $(libc_test_OBJECTS) $(libc_test_DEPENDENCIES) $(EXTRA_libc_test_DEPENDENCIES) ++ @rm -f libc_test$(EXEEXT) ++ $(AM_V_CCLD)$(LINK) $(libc_test_OBJECTS) $(libc_test_LDADD) $(LIBS) ++ + min_power_isa$(EXEEXT): $(min_power_isa_OBJECTS) $(min_power_isa_DEPENDENCIES) $(EXTRA_min_power_isa_DEPENDENCIES) + @rm -f min_power_isa$(EXEEXT) + $(AM_V_CCLD)$(min_power_isa_LINK) $(min_power_isa_OBJECTS) $(min_power_isa_LDADD) $(LIBS) +@@ -717,6 +725,7 @@ + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_test.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/is_ppc64_BE.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libc_test.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/min_power_isa-min_power_isa.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_features.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_test.Po@am__quote@ diff --git a/valgrind.spec b/valgrind.spec index c5a6417..ce42f27 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.12.0 -Release: 0.3.BETA1%{?dist} +Release: 0.4.RC2%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -59,7 +59,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %undefine _include_minidebuginfo #Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2 -Source0: valgrind-3.12.0.BETA1.tar.bz2 +Source0: valgrind-3.12.0.RC2.tar.bz2 # Needs investigation and pushing upstream Patch1: valgrind-3.9.0-cachegrind-improvements.patch @@ -70,12 +70,8 @@ Patch2: valgrind-3.9.0-helgrind-race-supp.patch # Make ld.so supressions slightly less specific. Patch3: valgrind-3.9.0-ldso-supp.patch -# KDE#369175 jm_vec_isa_2_07 test crashes on ppc64 -# KDE#369169 ppc64 fails jm_int_isa_2_07 test -Patch4: valgrind-3.12-beta1-ppc64be.patch - -# valgrind svn r15988 -Patch5: valgrind-3.12-beta1-ldflags.patch +# KDE#371396 - workaround helgrind and drd pth_cond_destroy_busy testcase hangs +Patch4: valgrind-3.12.0-skip-cond-var.patch %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches @@ -184,13 +180,12 @@ Valgrind User Manual for details. %endif %prep -%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}.BETA1 +%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}.RC2 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -384,6 +379,10 @@ echo ===============END TESTING=============== %endif %changelog +* Thu Oct 20 2016 Mark Wielaard - 3.12.0-0.4-RC2 +- Update to 3.12.0-RC1. Drop integrated patches. +- Add valgrind-3.12.0-skip-cond-var.patch + * Fri Sep 30 2016 Mark Wielaard - 3.12.0-0.3-BETA1 - Clear CFLAGS, CXXFLAGS and LDFLAGS during make check.