diff --git a/.gitignore b/.gitignore index 2369402..86b12a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /valgrind-3.7.0.tar.bz2 /valgrind-3.8.0-TEST1.tar.bz2 /valgrind-3.8.0.tar.bz2 +/valgrind-3.8.1.tar.bz2 diff --git a/sources b/sources index c420f24..400b660 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ec04dfd1256307432b2a7b520398c526 valgrind-3.8.0.tar.bz2 +288758010b271119a0ffc0183f1d6e38 valgrind-3.8.1.tar.bz2 diff --git a/valgrind-3.8.0-abbrev-parsing.patch b/valgrind-3.8.0-abbrev-parsing.patch deleted file mode 100644 index fdd5199..0000000 --- a/valgrind-3.8.0-abbrev-parsing.patch +++ /dev/null @@ -1,92 +0,0 @@ -Index: coregrind/m_debuginfo/readdwarf.c -=================================================================== ---- valgrind-3.8.0/coregrind/m_debuginfo/readdwarf.c (revision 12871) -+++ valgrind-3.8.0/coregrind/m_debuginfo/readdwarf.c (working copy) -@@ -1115,7 +1115,8 @@ - case 0x01: /* FORM_addr */ p += addr_size; break; - case 0x03: /* FORM_block2 */ p += ML_(read_UShort)(p) + 2; break; - case 0x04: /* FORM_block4 */ p += ML_(read_UInt)(p) + 4; break; -- case 0x09: /* FORM_block */ p += read_leb128U( &p ); break; -+ case 0x09: /* FORM_block */ /* fallthrough */ -+ case 0x18: /* FORM_exprloc */ { ULong block_len = read_leb128U( &p ); p += block_len; break; } - case 0x0a: /* FORM_block1 */ p += *p + 1; break; - case 0x0c: /* FORM_flag */ p++; break; - case 0x0d: /* FORM_sdata */ read_leb128S( &p ); break; -@@ -1126,7 +1127,6 @@ - case 0x13: /* FORM_ref4 */ p += 4; break; - case 0x14: /* FORM_ref8 */ p += 8; break; - case 0x15: /* FORM_ref_udata */ read_leb128U( &p ); break; -- case 0x18: /* FORM_exprloc */ p += read_leb128U( &p ); break; - case 0x19: /* FORM_flag_present */break; - case 0x20: /* FORM_ref_sig8 */ p += 8; break; - case 0x1f20: /* FORM_GNU_ref_alt */ p += ui->dw64 ? 8 : 4; break; -Index: coregrind/m_debuginfo/readdwarf.c -=================================================================== ---- valgrind-3.8.0/coregrind/m_debuginfo/readdwarf.c (revision 12871) -+++ valgrind-3.8.0/coregrind/m_debuginfo/readdwarf.c (working copy) -@@ -945,11 +945,11 @@ - /* Return abbrev for given code - * Returned pointer points to the tag - * */ --static UChar* lookup_abbrev( UChar* p, UInt acode ) -+static UChar* lookup_abbrev( UChar* p, UInt acode, UChar* end_img ) - { - UInt code; - UInt name; -- for( ; ; ) { -+ while( p < end_img ) { - code = read_leb128U( &p ); - if ( code == acode ) - return p; -@@ -959,7 +959,7 @@ - name = read_leb128U( &p ); /* name */ - read_leb128U( &p ); /* form */ - } -- while( name != 0 ); /* until name == form == 0 */ -+ while( name != 0 && p < end_img ); /* until name == form == 0 */ - } - return NULL; - } -@@ -985,6 +985,7 @@ - void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, - UChar* unitblock_img, - UChar* debugabbrev_img, -+ Word debug_abbv_sz, - UChar* debugstr_img, - UChar* debugstr_alt_img ) - { -@@ -1046,7 +1047,12 @@ - * not triggered since we shortcut the parsing once we have - * read the compile_unit block. This should only occur when - * level > 0 */ -- abbrev_img = lookup_abbrev( debugabbrev_img + atoffs, acode ); -+ abbrev_img = lookup_abbrev( debugabbrev_img + atoffs, acode, -+ debugabbrev_img + debug_abbv_sz ); -+ if ( abbrev_img == NULL ) { -+ VG_(printf)( "### unknown abbrev 0x%x\n", acode ); -+ break; -+ } - } - - tag = read_leb128U( &abbrev_img ); -@@ -1056,7 +1062,7 @@ - level++; - - /* And loop on entries */ -- for ( ; ; ) { -+ while( p < end_img ) { - /* Read entry definition */ - UInt name, form; - ULong cval = -1LL; /* Constant value read */ -@@ -1226,9 +1232,9 @@ - /* Fill ui with offset in .debug_line and compdir */ - if (0) - VG_(printf)( "Reading UnitInfo at 0x%lx.....\n", -- block_img - debug_info_img + 0UL ); -+ block_img - debug_info_img + 0UL, blklen, blklen_is_64 ); - read_unitinfo_dwarf2( &ui, block_img, -- debug_abbv_img, debug_str_img, -+ debug_abbv_img, debug_abbv_sz, debug_str_img, - debug_str_alt_img ); - if (0) - VG_(printf)( " => LINES=0x%llx NAME=%s DIR=%s\n", diff --git a/valgrind-3.8.0-avx-alignment-check.patch b/valgrind-3.8.0-avx-alignment-check.patch deleted file mode 100644 index 7a5421b..0000000 --- a/valgrind-3.8.0-avx-alignment-check.patch +++ /dev/null @@ -1,38 +0,0 @@ ------------------------------------------------------------------------- -r2499 | sewardj | 2012-09-02 14:13:34 +0200 (Sun, 02 Sep 2012) | 4 lines - -Remove alignment checks for VMPSADBW, VPHMINPOSUW, VPALIGNR since they -do not apply to the AVX versions of these instructions. Fixes #305926. -(Jakub Jelinek, jakub@redhat.com) - ------------------------------------------------------------------------- -Index: priv/guest_amd64_toIR.c -=================================================================== ---- valgrind-3.8.0/VEX/priv/guest_amd64_toIR.c (revision 2498) -+++ valgrind-3.8.0/VEX/priv/guest_amd64_toIR.c (revision 2499) -@@ -16028,7 +16028,8 @@ - DIP("%sphminposuw %s,%s\n", mbV, nameXMMReg(rE), nameXMMReg(rG)); - } else { - addr = disAMode ( &alen, vbi, pfx, delta, dis_buf, 0 ); -- gen_SEGV_if_not_16_aligned(addr); -+ if (!isAvx) -+ gen_SEGV_if_not_16_aligned(addr); - assign( sV, loadLE(Ity_V128, mkexpr(addr)) ); - delta += alen; - DIP("%sphminposuw %s,%s\n", mbV, dis_buf, nameXMMReg(rG)); -@@ -25898,7 +25899,6 @@ - nameXMMReg(rV), nameXMMReg(rG)); - } else { - addr = disAMode( &alen, vbi, pfx, delta, dis_buf, 1 ); -- gen_SEGV_if_not_16_aligned( addr ); - assign( sV, loadLE(Ity_V128, mkexpr(addr)) ); - imm8 = getUChar(delta+alen); - delta += alen+1; -@@ -26291,7 +26291,6 @@ - } else { - addr = disAMode( &alen, vbi, pfx, delta, dis_buf, - 1/* imm8 is 1 byte after the amode */ ); -- gen_SEGV_if_not_16_aligned( addr ); - assign( src_vec, loadLE( Ity_V128, mkexpr(addr) ) ); - imm8 = (Int)getUChar(delta+alen); - delta += alen+1; diff --git a/valgrind-3.8.0-avx2-bmi-fma.patch.gz b/valgrind-3.8.0-avx2-bmi-fma.patch.gz deleted file mode 100644 index ca79eb2..0000000 Binary files a/valgrind-3.8.0-avx2-bmi-fma.patch.gz and /dev/null differ diff --git a/valgrind-3.8.0-avx2-prereq.patch b/valgrind-3.8.0-avx2-prereq.patch deleted file mode 100644 index 615f61c..0000000 --- a/valgrind-3.8.0-avx2-prereq.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -u valgrind.avx.orig/none/tests/amd64/avx2-1.vgtest valgrind/none/tests/amd64/avx2-1.vgtest ---- valgrind.avx.orig/none/tests/amd64/avx2-1.vgtest 2012-09-19 16:40:20.675627549 +0200 -+++ valgrind/none/tests/amd64/avx2-1.vgtest 2012-09-19 20:53:16.939765249 +0200 -@@ -1,3 +1,3 @@ - prog: avx2-1 --prereq: ../../../tests/x86_amd64_features amd64-avx -+prereq: test -x avx2-1 && ../../../tests/x86_amd64_features amd64-avx - vgopts: -q -diff -u valgrind.avx.orig/none/tests/amd64/bmi.vgtest valgrind/none/tests/amd64/bmi.vgtest ---- valgrind.avx.orig/none/tests/amd64/bmi.vgtest 2012-09-19 16:40:20.368622951 +0200 -+++ valgrind/none/tests/amd64/bmi.vgtest 2012-09-19 20:54:31.168839454 +0200 -@@ -1,3 +1,3 @@ - prog: bmi --prereq: ../../../tests/x86_amd64_features amd64-avx -+prereq: test -x bmi && ../../../tests/x86_amd64_features amd64-avx - vgopts: -q -diff -u valgrind.avx.orig/none/tests/amd64/fma.vgtest valgrind/none/tests/amd64/fma.vgtest ---- valgrind.avx.orig/none/tests/amd64/fma.vgtest 2012-09-19 16:40:20.755628747 +0200 -+++ valgrind/none/tests/amd64/fma.vgtest 2012-09-19 20:54:58.851240219 +0200 -@@ -1,3 +1,3 @@ - prog: fma --prereq: ../../../tests/x86_amd64_features amd64-avx -+prereq: test -x fma && ../../../tests/x86_amd64_features amd64-avx - vgopts: -q diff --git a/valgrind-3.8.0-bmi-conf-check.patch b/valgrind-3.8.0-bmi-conf-check.patch deleted file mode 100644 index 1ac3301..0000000 --- a/valgrind-3.8.0-bmi-conf-check.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- valgrind-3.8.0/configure 2012-09-12 20:20:29.868427602 +0200 -+++ valgrind-3.8.0/configure 2012-09-13 18:28:42.354382238 +0200 -@@ -8389,9 +8389,9 @@ - - do { unsigned int h, l; - __asm__ __volatile__( -- "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); } -+ "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); - __asm__ __volatile__( -- "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "g" (0x7654321) : "edx" ); } -+ "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "rm" (0x7654321) : "edx" ); } - while (0) - - ; ---- valgrind-3.8.0/configure.in 2012-09-13 14:53:45.826948006 +0200 -+++ valgrind-3.8.0/configure.in 2012-09-13 18:28:20.725057751 +0200 -@@ -1822,9 +1822,9 @@ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ - do { unsigned int h, l; - __asm__ __volatile__( -- "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); } -+ "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); - __asm__ __volatile__( -- "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "g" (0x7654321) : "edx" ); } -+ "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "rm" (0x7654321) : "edx" ); } - while (0) - ]])], [ - ac_have_as_bmi=yes diff --git a/valgrind-3.8.0-cachegrind-improvements.patch b/valgrind-3.8.0-cachegrind-improvements.patch deleted file mode 100644 index b74af5c..0000000 --- a/valgrind-3.8.0-cachegrind-improvements.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- valgrind-3.8.0/cachegrind/cg_sim.c.jj 2011-10-26 23:24:32.000000000 +0200 -+++ valgrind-3.8.0/cachegrind/cg_sim.c 2011-12-09 17:31:19.256023683 +0100 -@@ -42,27 +42,30 @@ typedef struct { - Int size; /* bytes */ - Int assoc; - Int line_size; /* bytes */ -- Int sets; - Int sets_min_1; - Int line_size_bits; - Int tag_shift; -- Char desc_line[128]; - UWord* tags; --} cache_t2; -+ Char desc_line[128]; -+} cache_t2 -+#ifdef __GNUC__ -+__attribute__ ((aligned (8 * sizeof (Int)))) -+#endif -+; - - /* By this point, the size/assoc/line_size has been checked. */ - static void cachesim_initcache(cache_t config, cache_t2* c) - { -- Int i; -+ Int sets; - - c->size = config.size; - c->assoc = config.assoc; - c->line_size = config.line_size; - -- c->sets = (c->size / c->line_size) / c->assoc; -- c->sets_min_1 = c->sets - 1; -+ sets = (c->size / c->line_size) / c->assoc; -+ c->sets_min_1 = sets - 1; - c->line_size_bits = VG_(log2)(c->line_size); -- c->tag_shift = c->line_size_bits + VG_(log2)(c->sets); -+ c->tag_shift = c->line_size_bits + VG_(log2)(sets); - - if (c->assoc == 1) { - VG_(sprintf)(c->desc_line, "%d B, %d B, direct-mapped", -@@ -72,11 +75,8 @@ static void cachesim_initcache(cache_t c - c->size, c->line_size, c->assoc); - } - -- c->tags = VG_(malloc)("cg.sim.ci.1", -- sizeof(UWord) * c->sets * c->assoc); -- -- for (i = 0; i < c->sets * c->assoc; i++) -- c->tags[i] = 0; -+ c->tags = VG_(calloc)("cg.sim.ci.1", -+ sizeof(UWord), sets * c->assoc); - } - - /* This is done as a macro rather than by passing in the cache_t2 as an diff --git a/valgrind-3.8.0-capget.patch b/valgrind-3.8.0-capget.patch deleted file mode 100644 index 562cdec..0000000 --- a/valgrind-3.8.0-capget.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2010-04-07 08:14:12.000000000 -0400 -+++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2010-04-12 07:24:12.838876000 -0400 -@@ -2212,8 +2212,9 @@ PRE(sys_capget) - vki_cap_user_header_t, header, vki_cap_user_data_t, data); - PRE_MEM_READ( "capget(header)", ARG1, - sizeof(struct __vki_user_cap_header_struct) ); -- PRE_MEM_WRITE( "capget(data)", ARG2, -- sizeof(struct __vki_user_cap_data_struct) ); -+ if (ARG2 != (Addr)NULL) -+ PRE_MEM_WRITE( "capget(data)", ARG2, -+ sizeof(struct __vki_user_cap_data_struct) ); - } - POST(sys_capget) - { diff --git a/valgrind-3.8.0-cfi_dw_ops.patch b/valgrind-3.8.0-cfi_dw_ops.patch deleted file mode 100644 index 254f50f..0000000 --- a/valgrind-3.8.0-cfi_dw_ops.patch +++ /dev/null @@ -1,175 +0,0 @@ ---- valgrind-3.8.0/coregrind/m_debuginfo/readdwarf.c (revision 12990) -+++ valgrind-3.8.0/coregrind/m_debuginfo/readdwarf.c (working copy) -@@ -2733,6 +2733,7 @@ - Word sw; - UWord uw; - CfiOp op; -+ CfiUnop uop; - HChar* opname; - - Int sp; /* # of top element: valid is -1 .. N_EXPR_STACK-1 */ -@@ -2778,7 +2779,7 @@ - break; - } - -- op = 0; opname = NULL; /* excessively conservative */ -+ op = 0; uop = 0; opname = NULL; /* excessively conservative */ - - opcode = *expr++; - switch (opcode) { -@@ -2836,6 +2837,15 @@ - VG_(printf)("DW_OP_const4s: %ld", sw); - break; - -+ case DW_OP_const2s: -+ /* push: 16-bit signed immediate */ -+ sw = read_le_s_encoded_literal( expr, 4 ); -+ expr += 2; -+ PUSH( ML_(CfiExpr_Const)( dst, (UWord)sw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const2s: %ld", sw); -+ break; -+ - case DW_OP_const1s: - /* push: 8-bit signed immediate */ - sw = read_le_s_encoded_literal( expr, 1 ); -@@ -2845,6 +2855,46 @@ - VG_(printf)("DW_OP_const1s: %ld", sw); - break; - -+ case DW_OP_const1u: -+ /* push: 8-bit unsigned immediate */ -+ uw = read_le_u_encoded_literal( expr, 1 ); -+ expr += 1; -+ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const1: %lu", uw); -+ break; -+ -+ case DW_OP_const2u: -+ /* push: 16-bit unsigned immediate */ -+ uw = read_le_u_encoded_literal( expr, 2 ); -+ expr += 2; -+ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const2: %lu", uw); -+ break; -+ -+ case DW_OP_const4u: -+ /* push: 32-bit unsigned immediate */ -+ uw = read_le_u_encoded_literal( expr, 4 ); -+ expr += 4; -+ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_const4: %lu", uw); -+ break; -+ -+ case DW_OP_abs: -+ uop = Cunop_Abs; opname = "abs"; goto unop; -+ case DW_OP_neg: -+ uop = Cunop_Neg; opname = "neg"; goto unop; -+ case DW_OP_not: -+ uop = Cunop_Not; opname = "not"; goto unop; -+ unop: -+ POP( ix ); -+ PUSH( ML_(CfiExpr_Unop)( dst, uop, ix ) ); -+ if (ddump_frames) -+ VG_(printf)("DW_OP_%s", opname); -+ break; -+ - case DW_OP_minus: - op = Cop_Sub; opname = "minus"; goto binop; - case DW_OP_plus: ---- valgrind-3.8.0/coregrind/m_debuginfo/debuginfo.c (revision 12990) -+++ valgrind-3.8.0/coregrind/m_debuginfo/debuginfo.c (working copy) -@@ -2051,7 +2051,7 @@ - UWord evalCfiExpr ( XArray* exprs, Int ix, - CfiExprEvalContext* eec, Bool* ok ) - { -- UWord wL, wR; -+ UWord w, wL, wR; - Addr a; - CfiExpr* e; - vg_assert(sizeof(Addr) == sizeof(UWord)); -@@ -2118,6 +2118,16 @@ - } - /* let's hope it doesn't trap! */ - return ML_(read_UWord)((void *)a); -+ case Cex_Unop: -+ w = evalCfiExpr( exprs, e->Cex.Unop.ix, eec, ok ); -+ if (!(*ok)) return 0; -+ switch (e->Cex.Unop.op) { -+ case Cunop_Abs: return (Word) w < 0 ? - w : w; -+ case Cunop_Neg: return - (Word) w; -+ case Cunop_Not: return ~ w; -+ default: goto unhandled; -+ } -+ /*NOTREACHED*/ - default: - goto unhandled; - } ---- valgrind-3.8.0/coregrind/m_debuginfo/storage.c (revision 12990) -+++ valgrind-3.8.0/coregrind/m_debuginfo/storage.c (working copy) -@@ -595,6 +595,16 @@ - e.Cex.Binop.ixR = ixR; - return (Int)VG_(addToXA)( dst, &e ); - } -+Int ML_(CfiExpr_Unop)( XArray* dst, CfiUnop op, Int ix ) -+{ -+ CfiExpr e; -+ VG_(memset)( &e, 0, sizeof(e) ); -+ e.tag = Cex_Unop; -+ e.Cex.Unop.op = op; -+ e.Cex.Unop.ix = ix; -+ return (Int)VG_(addToXA)( dst, &e ); -+} -+ - Int ML_(CfiExpr_CfiReg)( XArray* dst, CfiReg reg ) - { - CfiExpr e; ---- valgrind-3.8.0/coregrind/m_debuginfo/priv_storage.h (revision 12990) -+++ valgrind-3.8.0/coregrind/m_debuginfo/priv_storage.h (working copy) -@@ -296,6 +296,14 @@ - - typedef - enum { -+ Cunop_Abs=0x231, -+ Cunop_Neg, -+ Cunop_Not -+ } -+ CfiUnop; -+ -+typedef -+ enum { - Creg_IA_SP=0x213, - Creg_IA_BP, - Creg_IA_IP, -@@ -315,7 +323,8 @@ - Cex_Const, - Cex_Binop, - Cex_CfiReg, -- Cex_DwReg -+ Cex_DwReg, -+ Cex_Unop - } - CfiExprTag; - -@@ -342,6 +351,10 @@ - struct { - Int reg; - } DwReg; -+ struct { -+ CfiUnop op; -+ Int ix; -+ } Unop; - } - Cex; - } -@@ -353,6 +366,7 @@ - extern Int ML_(CfiExpr_Binop) ( XArray* dst, CfiOp op, Int ixL, Int ixR ); - extern Int ML_(CfiExpr_CfiReg)( XArray* dst, CfiReg reg ); - extern Int ML_(CfiExpr_DwReg) ( XArray* dst, Int reg ); -+extern Int ML_(CfiExpr_Unop) ( XArray* dst, CfiUnop op, Int ix ); - - extern void ML_(ppCfiExpr)( XArray* src, Int ix ); - diff --git a/valgrind-3.8.0-config_h.patch b/valgrind-3.8.0-config_h.patch deleted file mode 100644 index 47a498f..0000000 --- a/valgrind-3.8.0-config_h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- valgrind/include/pub_tool_basics.h.jj 2011-10-26 23:24:32.000000000 +0200 -+++ valgrind/include/pub_tool_basics.h 2011-12-09 17:42:50.828630546 +0100 -@@ -297,7 +297,7 @@ static inline Bool sr_EQ ( SysRes sr1, S - #define VG_BUGS_TO "www.valgrind.org" - - /* Branch prediction hints. */ --#if defined(__GNUC__) -+#if defined(__GNUC__) && (__GNUC__ >= 3) - # define LIKELY(x) __builtin_expect(!!(x), 1) - # define UNLIKELY(x) __builtin_expect(!!(x), 0) - #else diff --git a/valgrind-3.8.0-enable-armv5.patch b/valgrind-3.8.0-enable-armv5.patch deleted file mode 100644 index 9f9a66f..0000000 --- a/valgrind-3.8.0-enable-armv5.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- valgrind-3.7.0.old/configure.in 2012-03-05 15:16:23.000000000 -0500 -+++ valgrind-3.7.0/configure.in 2012-03-05 13:49:04.000000000 -0500 -@@ -186,7 +186,7 @@ case "${host_cpu}" in - ARCH_MAX="s390x" - ;; - -- armv7*) -+ armv[57]*) - AC_MSG_RESULT([ok (${host_cpu})]) - ARCH_MAX="arm" - ;; ---- valgrind-3.7.0.old/configure 2012-03-05 15:16:23.000000000 -0500 -+++ valgrind-3.7.0/configure 2012-03-05 13:49:04.000000000 -0500 -@@ -5335,7 +5335,7 @@ - ARCH_MAX="s390x" - ;; - -- armv7*) -+ armv[57]*) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})" >&5 - $as_echo "ok (${host_cpu})" >&6; } - ARCH_MAX="arm" diff --git a/valgrind-3.8.0-find-buildid.patch b/valgrind-3.8.0-find-buildid.patch deleted file mode 100644 index f58d59f..0000000 --- a/valgrind-3.8.0-find-buildid.patch +++ /dev/null @@ -1,44 +0,0 @@ -Index: coregrind/m_debuginfo/readelf.c -=================================================================== ---- valgrind-3.8.0/coregrind/m_debuginfo/readelf.c (revision 12871) -+++ valgrind-3.8.0/coregrind/m_debuginfo/readelf.c (working copy) -@@ -888,7 +888,7 @@ - * http://fedoraproject.org/wiki/RolandMcGrath/BuildID - */ - static --Char *find_buildid(Addr image, UWord n_image, Bool rel_ok) -+Char *find_buildid(Addr image, UWord n_image, Bool rel_ok, Bool search_shdrs) - { - Char* buildid = NULL; - __attribute__((unused)) /* on Android, at least */ -@@ -930,7 +930,11 @@ - } - } - -- if (buildid || !rel_ok) -+ /* Normally we would only search shdrs for ET_REL files, but when -+ we search for a separate .debug file phdrs might not be there -+ (they are never loaded) or have been corrupted, so try again -+ against shdrs. */ -+ if (buildid || (!rel_ok && !search_shdrs)) - return buildid; - - for (i = 0; i < ehdr->e_shnum; i++) { -@@ -1074,7 +1078,7 @@ - return 0; - - if (buildid) { -- Char* debug_buildid = find_buildid(sr_Res(sres), *size, rel_ok); -+ Char* debug_buildid = find_buildid(sr_Res(sres), *size, rel_ok, True); - if (debug_buildid == NULL || VG_(strcmp)(buildid, debug_buildid) != 0) { - SysRes res = VG_(am_munmap_valgrind)(sr_Res(sres), *size); - vg_assert(!sr_isError(res)); -@@ -2274,7 +2278,7 @@ - vg_assert(dimage == 0 && n_dimage == 0); - - /* Look for a build-id */ -- buildid = find_buildid(oimage, n_oimage, False); -+ buildid = find_buildid(oimage, n_oimage, False, False); - - /* Look for a debug image */ - if (buildid != NULL || debuglink_img != NULL) { diff --git a/valgrind-3.8.0-helgrind-race-supp.patch b/valgrind-3.8.0-helgrind-race-supp.patch deleted file mode 100644 index 759d151..0000000 --- a/valgrind-3.8.0-helgrind-race-supp.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- valgrind/glibc-2.34567-NPTL-helgrind.supp.jj 2009-08-19 15:37:48.000000000 +0200 -+++ valgrind/glibc-2.34567-NPTL-helgrind.supp 2009-10-21 16:46:31.000000000 +0200 -@@ -88,6 +88,12 @@ - obj:*/lib*/libpthread-2.*so* - } - { -+ helgrind-glibc2X-102a -+ Helgrind:Race -+ fun:mythread_wrapper -+ obj:*vgpreload_helgrind*.so -+} -+{ - helgrind-glibc2X-103 - Helgrind:Race - fun:pthread_cond_*@@GLIBC_2.* diff --git a/valgrind-3.8.0-ldso-supp.patch b/valgrind-3.8.0-ldso-supp.patch deleted file mode 100644 index 1f999b8..0000000 --- a/valgrind-3.8.0-ldso-supp.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- valgrind-3.7.0/glibc-2.X.supp.in.jj 2011-10-26 23:24:45.000000000 +0200 -+++ valgrind-3.7.0/glibc-2.X.supp.in 2012-05-07 10:55:20.395942656 +0200 -@@ -124,7 +124,7 @@ - glibc-2.5.x-on-SUSE-10.2-(PPC)-2a - Memcheck:Cond - fun:index -- obj:*ld-@GLIBC_VERSION@.*.so -+ obj:*ld-@GLIBC_VERSION@*.so - } - { - glibc-2.5.x-on-SuSE-10.2-(PPC)-2b -@@ -136,14 +136,14 @@ - glibc-2.5.5-on-SuSE-10.2-(PPC)-2c - Memcheck:Addr4 - fun:index -- obj:*ld-@GLIBC_VERSION@.*.so -+ obj:*ld-@GLIBC_VERSION@*.so - } - { - glibc-2.3.5-on-SuSE-10.1-(PPC)-3 - Memcheck:Addr4 - fun:*wordcopy_fwd_dest_aligned* - fun:mem*cpy -- obj:*lib*@GLIBC_VERSION@.*.so -+ obj:*lib*@GLIBC_VERSION@*.so - } - - { diff --git a/valgrind-3.8.0-lzcnt-tzcnt-bugfix.patch b/valgrind-3.8.0-lzcnt-tzcnt-bugfix.patch deleted file mode 100644 index 00d8bf3..0000000 --- a/valgrind-3.8.0-lzcnt-tzcnt-bugfix.patch +++ /dev/null @@ -1,66 +0,0 @@ ------------------------------------------------------------------------- -r2478 | sewardj | 2012-08-23 22:14:51 +0200 (Thu, 23 Aug 2012) | 4 lines - -Fix LZCNT and TZCNT properly. Fixes #295808. (Jakub Jelinek, -jakub@redhat.com) - - ------------------------------------------------------------------------- -Index: priv/guest_amd64_toIR.c -=================================================================== ---- valgrind-3.8.0/VEX/priv/guest_amd64_toIR.c (revision 2477) -+++ valgrind-3.8.0/VEX/priv/guest_amd64_toIR.c (revision 2478) -@@ -20084,13 +20084,16 @@ - return delta; - - case 0xBC: /* BSF Gv,Ev */ -- if (haveF2orF3(pfx)) goto decode_failure; -+ if (haveF2(pfx)) goto decode_failure; - delta = dis_bs_E_G ( vbi, pfx, sz, delta, True ); - return delta; - - case 0xBD: /* BSR Gv,Ev */ -- if (!haveF2orF3(pfx)) { -- /* no-F2 no-F3 0F BD = BSR */ -+ if (!haveF2orF3(pfx) -+ || (haveF3noF2(pfx) -+ && 0 == (archinfo->hwcaps & VEX_HWCAPS_AMD64_LZCNT))) { -+ /* no-F2 no-F3 0F BD = BSR -+ or F3 0F BD = REP; BSR on older CPUs. */ - delta = dis_bs_E_G ( vbi, pfx, sz, delta, False ); - return delta; - } -Index: priv/guest_x86_toIR.c -=================================================================== ---- valgrind-3.8.0/VEX/priv/guest_x86_toIR.c (revision 2477) -+++ valgrind-3.8.0/VEX/priv/guest_x86_toIR.c (revision 2478) -@@ -14021,12 +14021,28 @@ - for the rest, it means REP) */ - case 0xF3: { - Addr32 eip_orig = guest_EIP_bbstart + delta_start; -- if (sorb != 0) goto decode_failure; - abyte = getIByte(delta); delta++; - - if (abyte == 0x66) { sz = 2; abyte = getIByte(delta); delta++; } - -+ if (sorb != 0 && abyte != 0x0F) goto decode_failure; -+ - switch (abyte) { -+ case 0x0F: -+ switch (getIByte(delta)) { -+ /* On older CPUs, TZCNT behaves the same as BSF. */ -+ case 0xBC: /* REP BSF Gv,Ev */ -+ delta = dis_bs_E_G ( sorb, sz, delta + 1, True ); -+ break; -+ /* On older CPUs, LZCNT behaves the same as BSR. */ -+ case 0xBD: /* REP BSR Gv,Ev */ -+ delta = dis_bs_E_G ( sorb, sz, delta + 1, False ); -+ break; -+ default: -+ goto decode_failure; -+ } -+ break; -+ - case 0xA4: sz = 1; /* REP MOVS */ - case 0xA5: - dis_REP_op ( &dres, X86CondAlways, dis_MOVS, sz, eip_orig, diff --git a/valgrind-3.8.0-memcheck-mc_translate-Iop_8HLto16.patch b/valgrind-3.8.0-memcheck-mc_translate-Iop_8HLto16.patch deleted file mode 100644 index 49346a6..0000000 --- a/valgrind-3.8.0-memcheck-mc_translate-Iop_8HLto16.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- valgrind-3.8.0/memcheck/mc_translate.c (revision 12883) -+++ valgrind-3.8.0/memcheck/mc_translate.c (revision 12884) -@@ -3313,6 +3313,8 @@ - case Iop_DivModS128to64: - return mkLazy2(mce, Ity_I128, vatom1, vatom2); - -+ case Iop_8HLto16: -+ return assignNew('V', mce, Ity_I16, binop(op, vatom1, vatom2)); - case Iop_16HLto32: - return assignNew('V', mce, Ity_I32, binop(op, vatom1, vatom2)); - case Iop_32HLto64: diff --git a/valgrind-3.8.0-openat.patch b/valgrind-3.8.0-openat.patch deleted file mode 100644 index 87a4098..0000000 --- a/valgrind-3.8.0-openat.patch +++ /dev/null @@ -1,38 +0,0 @@ -Testcase: -#define _GNU_SOURCE -#include -#include - -int -main (void) -{ - int dfd = open ("/tmp", O_RDONLY); - int fd1 = openat (dfd, "abc", O_RDONLY); - int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY); - int fd3 = openat (AT_FDCWD, "abc", O_RDONLY); - /* This is the only one that should warn. */ - int fd4 = openat (0x12345678, "abc", O_RDONLY); - return 0; -} - ---- valgrind-3.8.0/coregrind/m_syswrap/syswrap-linux.c.jj 2007-12-11 00:18:43.000000000 +0100 -+++ valgrind-3.8.0/coregrind/m_syswrap/syswrap-linux.c 2008-03-03 11:35:15.000000000 +0100 -@@ -3308,10 +3308,15 @@ PRE(sys_openat) - int, dfd, const char *, filename, int, flags); - } - -- if (ARG1 != VKI_AT_FDCWD && !ML_(fd_allowed)(ARG1, "openat", tid, False)) -+ PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); -+ -+ /* For absolute filenames, dfd is ignored. If dfd is AT_FDCWD, -+ filename is relative to cwd. */ -+ if (ML_(safe_to_deref)( (void*)ARG2, 1 ) -+ && *(Char *)ARG2 != '/' -+ && ARG1 != VKI_AT_FDCWD -+ && !ML_(fd_allowed)(ARG1, "openat", tid, False)) - SET_STATUS_Failure( VKI_EBADF ); -- else -- PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); - - /* Handle the case where the open is of /proc/self/cmdline or - /proc//cmdline, and just give it a copy of the fd for the diff --git a/valgrind-3.8.0-pie.patch b/valgrind-3.8.0-pie.patch deleted file mode 100644 index 26c976b..0000000 --- a/valgrind-3.8.0-pie.patch +++ /dev/null @@ -1,40 +0,0 @@ -From eb8d355b64e72bfdf1c8dd2534b1625d5d0118e0 Mon Sep 17 00:00:00 2001 -From: Dodji Seketeli -Date: Thu, 13 Jan 2011 16:04:39 +0100 -Subject: [PATCH] Fix crash loading certain binaries on ppc64 - -Increase the space left for VDSO on ppc64 compiled with 64KB page -size. the size of VDSO is at least 2 pages: one for the code and one -for the data. We ought to leave more than two page space then. The -patch leaves 8 pages space to comply with what is done already for 4KB -page sizes. ---- - coregrind/m_ume/elf.c | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) - ---- valgrind/coregrind/m_ume/elf.c -+++ valgrind/coregrind/m_ume/elf.c -@@ -327,6 +327,7 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) - /* The kernel maps position-independent executables at TASK_SIZE*2/3; - duplicate this behavior as close as we can. */ - if (e->e.e_type == ET_DYN && ebase == 0) { -+ ESZ(Addr) hacky_load_address; - ebase = VG_PGROUNDDN(info->exe_base - + (info->exe_end - info->exe_base) * 2 / 3); - /* We really don't want to load PIEs at zero or too close. It -@@ -336,10 +337,11 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) - nonpointers. So, hackily, move it above 1MB. */ - /* Later .. is appears ppc32-linux tries to put [vdso] at 1MB, - which totally screws things up, because nothing else can go -- there. So bump the hacky load addess along by 0x8000, to -- 0x108000. */ -- if (ebase < 0x108000) -- ebase = 0x108000; -+ there. The size of [vdso] is around 2 or 3 pages, so bump -+ the hacky load addess along by 8 * VKI_PAGE_SIZE to be safe. */ -+ hacky_load_address = 0x100000 + 8 * VKI_PAGE_SIZE; -+ if (ebase < hacky_load_address) -+ ebase = hacky_load_address; - } - - info->phnum = e->e.e_phnum; diff --git a/valgrind-3.8.0-stat_h.patch b/valgrind-3.8.0-stat_h.patch deleted file mode 100644 index 628dd79..0000000 --- a/valgrind-3.8.0-stat_h.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- valgrind/include/vki/vki-amd64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-amd64-linux.h 2010-01-20 04:41:52.662552000 -0500 -@@ -328,6 +328,9 @@ struct vki_stat { - long st_blksize; - long st_blocks; /* Number 512-byte blocks allocated. */ - -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; ---- valgrind/include/vki/vki-x86-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-x86-linux.h 2010-01-20 04:42:19.649995000 -0500 -@@ -366,6 +366,9 @@ struct vki_stat { - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; ---- valgrind/include/vki/vki-ppc32-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-ppc32-linux.h 2010-01-20 04:42:44.861651000 -0500 -@@ -410,6 +410,9 @@ struct vki_stat { - long st_size; - unsigned long st_blksize; - unsigned long st_blocks; -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; ---- valgrind/include/vki/vki-ppc64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 -+++ valgrind/include/vki/vki-ppc64-linux.h 2010-01-20 04:43:05.579922000 -0500 -@@ -446,6 +446,9 @@ struct vki_stat { - long st_size; - unsigned long st_blksize; - unsigned long st_blocks; -+#undef st_atime -+#undef st_mtime -+#undef st_ctime - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; diff --git a/valgrind-3.8.0-x86-backtrace.patch b/valgrind-3.8.0-x86-backtrace.patch deleted file mode 100644 index fc9d055..0000000 --- a/valgrind-3.8.0-x86-backtrace.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- valgrind-3.8.0/coregrind/m_stacktrace.c.jj 2012-08-05 18:04:16.000000000 +0200 -+++ valgrind-3.8.0/coregrind/m_stacktrace.c 2012-08-10 12:13:46.069797051 +0200 -@@ -149,11 +149,23 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId - /* Try to derive a new (ip,sp,fp) triple from the current - set. */ - -- /* On x86, first try the old-fashioned method of following the -- %ebp-chain. Code which doesn't use this (that is, compiled -- with -fomit-frame-pointer) is not ABI compliant and so -- relatively rare. Besides, trying the CFI first almost always -- fails, and is expensive. */ -+ /* On x86 GCC 4.6 and later now defaults to -fomit-frame-pointer -+ together with emitting unwind info (-fasynchronous-unwind-tables). -+ So, try CF info first. */ -+ if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) { -+ if (0 == uregs.xip || 1 == uregs.xip) break; -+ if (sps) sps[i] = uregs.xsp; -+ if (fps) fps[i] = uregs.xbp; -+ ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */ -+ if (debug) -+ VG_(printf)(" ipsC[%d]=0x%08lx\n", i-1, ips[i-1]); -+ uregs.xip = uregs.xip - 1; -+ /* as per comment at the head of this loop */ -+ continue; -+ } -+ -+ /* And only then the old-fashioned method of following the -+ %ebp-chain. */ - /* Deal with frames resulting from functions which begin "pushl% - ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */ - if (fp_min <= uregs.xbp && -@@ -179,20 +191,6 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId - uregs.xip = uregs.xip - 1; - /* as per comment at the head of this loop */ - continue; -- } -- -- /* That didn't work out, so see if there is any CF info to hand -- which can be used. */ -- if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) { -- if (0 == uregs.xip || 1 == uregs.xip) break; -- if (sps) sps[i] = uregs.xsp; -- if (fps) fps[i] = uregs.xbp; -- ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */ -- if (debug) -- VG_(printf)(" ipsC[%d]=0x%08lx\n", i-1, ips[i-1]); -- uregs.xip = uregs.xip - 1; -- /* as per comment at the head of this loop */ -- continue; - } - - /* And, similarly, try for MSVC FPO unwind info. */ diff --git a/valgrind-3.8.1-abbrev-parsing.patch b/valgrind-3.8.1-abbrev-parsing.patch new file mode 100644 index 0000000..a12dc82 --- /dev/null +++ b/valgrind-3.8.1-abbrev-parsing.patch @@ -0,0 +1,70 @@ +Index: coregrind/m_debuginfo/readdwarf.c +=================================================================== +--- valgrind/coregrind/m_debuginfo/readdwarf.c (revision 12871) ++++ valgrind/coregrind/m_debuginfo/readdwarf.c (working copy) +@@ -945,11 +945,11 @@ + /* Return abbrev for given code + * Returned pointer points to the tag + * */ +-static UChar* lookup_abbrev( UChar* p, UInt acode ) ++static UChar* lookup_abbrev( UChar* p, UInt acode, UChar* end_img ) + { + UInt code; + UInt name; +- for( ; ; ) { ++ while( p < end_img ) { + code = read_leb128U( &p ); + if ( code == acode ) + return p; +@@ -959,7 +959,7 @@ + name = read_leb128U( &p ); /* name */ + read_leb128U( &p ); /* form */ + } +- while( name != 0 ); /* until name == form == 0 */ ++ while( name != 0 && p < end_img ); /* until name == form == 0 */ + } + return NULL; + } +@@ -985,6 +985,7 @@ + void read_unitinfo_dwarf2( /*OUT*/UnitInfo* ui, + UChar* unitblock_img, + UChar* debugabbrev_img, ++ Word debug_abbv_sz, + UChar* debugstr_img, + UChar* debugstr_alt_img ) + { +@@ -1046,7 +1047,12 @@ + * not triggered since we shortcut the parsing once we have + * read the compile_unit block. This should only occur when + * level > 0 */ +- abbrev_img = lookup_abbrev( debugabbrev_img + atoffs, acode ); ++ abbrev_img = lookup_abbrev( debugabbrev_img + atoffs, acode, ++ debugabbrev_img + debug_abbv_sz ); ++ if ( abbrev_img == NULL ) { ++ VG_(printf)( "### unknown abbrev 0x%x\n", acode ); ++ break; ++ } + } + + tag = read_leb128U( &abbrev_img ); +@@ -1056,7 +1062,7 @@ + level++; + + /* And loop on entries */ +- for ( ; ; ) { ++ while( p < end_img ) { + /* Read entry definition */ + UInt name, form; + ULong cval = -1LL; /* Constant value read */ +@@ -1226,9 +1232,9 @@ + /* Fill ui with offset in .debug_line and compdir */ + if (0) + VG_(printf)( "Reading UnitInfo at 0x%lx.....\n", +- block_img - debug_info_img + 0UL ); ++ block_img - debug_info_img + 0UL, blklen, blklen_is_64 ); + read_unitinfo_dwarf2( &ui, block_img, +- debug_abbv_img, debug_str_img, ++ debug_abbv_img, debug_abbv_sz, debug_str_img, + debug_str_alt_img ); + if (0) + VG_(printf)( " => LINES=0x%llx NAME=%s DIR=%s\n", diff --git a/valgrind-3.8.1-avx2-bmi-fma.patch.gz b/valgrind-3.8.1-avx2-bmi-fma.patch.gz new file mode 100644 index 0000000..ca79eb2 Binary files /dev/null and b/valgrind-3.8.1-avx2-bmi-fma.patch.gz differ diff --git a/valgrind-3.8.1-avx2-prereq.patch b/valgrind-3.8.1-avx2-prereq.patch new file mode 100644 index 0000000..2585091 --- /dev/null +++ b/valgrind-3.8.1-avx2-prereq.patch @@ -0,0 +1,21 @@ +--- valgrind/none/tests/amd64/avx2-1.vgtest 2012-09-19 16:40:20.675627549 +0200 ++++ valgrind/none/tests/amd64/avx2-1.vgtest 2012-09-19 20:53:16.939765249 +0200 +@@ -1,3 +1,3 @@ + prog: avx2-1 +-prereq: ../../../tests/x86_amd64_features amd64-avx ++prereq: test -x avx2-1 && ../../../tests/x86_amd64_features amd64-avx + vgopts: -q +--- valgrind/none/tests/amd64/bmi.vgtest 2012-09-19 16:40:20.368622951 +0200 ++++ valgrind/none/tests/amd64/bmi.vgtest 2012-09-19 20:54:31.168839454 +0200 +@@ -1,3 +1,3 @@ + prog: bmi +-prereq: ../../../tests/x86_amd64_features amd64-avx ++prereq: test -x bmi && ../../../tests/x86_amd64_features amd64-avx + vgopts: -q +--- valgrind/none/tests/amd64/fma.vgtest 2012-09-19 16:40:20.755628747 +0200 ++++ valgrind/none/tests/amd64/fma.vgtest 2012-09-19 20:54:58.851240219 +0200 +@@ -1,3 +1,3 @@ + prog: fma +-prereq: ../../../tests/x86_amd64_features amd64-avx ++prereq: test -x fma && ../../../tests/x86_amd64_features amd64-avx + vgopts: -q diff --git a/valgrind-3.8.1-bmi-conf-check.patch b/valgrind-3.8.1-bmi-conf-check.patch new file mode 100644 index 0000000..a201cf7 --- /dev/null +++ b/valgrind-3.8.1-bmi-conf-check.patch @@ -0,0 +1,28 @@ +--- valgrind/configure 2012-09-12 20:20:29.868427602 +0200 ++++ valgrind/configure 2012-09-13 18:28:42.354382238 +0200 +@@ -8389,9 +8389,9 @@ + + do { unsigned int h, l; + __asm__ __volatile__( +- "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); } ++ "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); + __asm__ __volatile__( +- "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "g" (0x7654321) : "edx" ); } ++ "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "rm" (0x7654321) : "edx" ); } + while (0) + + ; +--- valgrind/configure.in 2012-09-13 14:53:45.826948006 +0200 ++++ valgrind/configure.in 2012-09-13 18:28:20.725057751 +0200 +@@ -1822,9 +1822,9 @@ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ + do { unsigned int h, l; + __asm__ __volatile__( +- "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); } ++ "andn %2, %1, %0" : "=r" (h) : "r" (0x1234567), "r" (0x7654321) ); + __asm__ __volatile__( +- "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "g" (0x7654321) : "edx" ); } ++ "movl %2, %%edx; mulx %3, %1, %0" : "=r" (h), "=r" (l) : "g" (0x1234567), "rm" (0x7654321) : "edx" ); } + while (0) + ]])], [ + ac_have_as_bmi=yes diff --git a/valgrind-3.8.1-cachegrind-improvements.patch b/valgrind-3.8.1-cachegrind-improvements.patch new file mode 100644 index 0000000..f6f9a1f --- /dev/null +++ b/valgrind-3.8.1-cachegrind-improvements.patch @@ -0,0 +1,54 @@ +--- valgrind-3.8.1/cachegrind/cg_sim.c.jj 2011-10-26 23:24:32.000000000 +0200 ++++ valgrind-3.8.1/cachegrind/cg_sim.c 2011-12-09 17:31:19.256023683 +0100 +@@ -42,27 +42,30 @@ typedef struct { + Int size; /* bytes */ + Int assoc; + Int line_size; /* bytes */ +- Int sets; + Int sets_min_1; + Int line_size_bits; + Int tag_shift; +- Char desc_line[128]; + UWord* tags; +-} cache_t2; ++ Char desc_line[128]; ++} cache_t2 ++#ifdef __GNUC__ ++__attribute__ ((aligned (8 * sizeof (Int)))) ++#endif ++; + + /* By this point, the size/assoc/line_size has been checked. */ + static void cachesim_initcache(cache_t config, cache_t2* c) + { +- Int i; ++ Int sets; + + c->size = config.size; + c->assoc = config.assoc; + c->line_size = config.line_size; + +- c->sets = (c->size / c->line_size) / c->assoc; +- c->sets_min_1 = c->sets - 1; ++ sets = (c->size / c->line_size) / c->assoc; ++ c->sets_min_1 = sets - 1; + c->line_size_bits = VG_(log2)(c->line_size); +- c->tag_shift = c->line_size_bits + VG_(log2)(c->sets); ++ c->tag_shift = c->line_size_bits + VG_(log2)(sets); + + if (c->assoc == 1) { + VG_(sprintf)(c->desc_line, "%d B, %d B, direct-mapped", +@@ -72,11 +75,8 @@ static void cachesim_initcache(cache_t c + c->size, c->line_size, c->assoc); + } + +- c->tags = VG_(malloc)("cg.sim.ci.1", +- sizeof(UWord) * c->sets * c->assoc); +- +- for (i = 0; i < c->sets * c->assoc; i++) +- c->tags[i] = 0; ++ c->tags = VG_(calloc)("cg.sim.ci.1", ++ sizeof(UWord), sets * c->assoc); + } + + /* This is done as a macro rather than by passing in the cache_t2 as an diff --git a/valgrind-3.8.1-capget.patch b/valgrind-3.8.1-capget.patch new file mode 100644 index 0000000..c6bf39f --- /dev/null +++ b/valgrind-3.8.1-capget.patch @@ -0,0 +1,39 @@ +#include +#include +#include + +int +main (int c, char **argv) +{ + struct __user_cap_header_struct hdr; + hdr.version = _LINUX_CAPABILITY_VERSION; + hdr.pid = 0; + (void) capget(&hdr, NULL); + switch (hdr.version) { + case _LINUX_CAPABILITY_VERSION_1: + printf("Version 1\n"); + break; + case _LINUX_CAPABILITY_VERSION_2: + printf("Version 2\n"); + break; + default: + printf("Unknown version\n"); + break; + } + return 0; +} + +--- valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c.jj 2010-04-07 08:14:12.000000000 -0400 ++++ valgrind-3.7.0/coregrind/m_syswrap/syswrap-linux.c 2010-04-12 07:24:12.838876000 -0400 +@@ -2212,8 +2212,9 @@ PRE(sys_capget) + vki_cap_user_header_t, header, vki_cap_user_data_t, data); + PRE_MEM_READ( "capget(header)", ARG1, + sizeof(struct __vki_user_cap_header_struct) ); +- PRE_MEM_WRITE( "capget(data)", ARG2, +- sizeof(struct __vki_user_cap_data_struct) ); ++ if (ARG2 != (Addr)NULL) ++ PRE_MEM_WRITE( "capget(data)", ARG2, ++ sizeof(struct __vki_user_cap_data_struct) ); + } + POST(sys_capget) + { diff --git a/valgrind-3.8.1-cfi_dw_ops.patch b/valgrind-3.8.1-cfi_dw_ops.patch new file mode 100644 index 0000000..38962b0 --- /dev/null +++ b/valgrind-3.8.1-cfi_dw_ops.patch @@ -0,0 +1,175 @@ +--- valgrind/coregrind/m_debuginfo/readdwarf.c (revision 12990) ++++ valgrind/coregrind/m_debuginfo/readdwarf.c (working copy) +@@ -2733,6 +2733,7 @@ + Word sw; + UWord uw; + CfiOp op; ++ CfiUnop uop; + HChar* opname; + + Int sp; /* # of top element: valid is -1 .. N_EXPR_STACK-1 */ +@@ -2778,7 +2779,7 @@ + break; + } + +- op = 0; opname = NULL; /* excessively conservative */ ++ op = 0; uop = 0; opname = NULL; /* excessively conservative */ + + opcode = *expr++; + switch (opcode) { +@@ -2836,6 +2837,15 @@ + VG_(printf)("DW_OP_const4s: %ld", sw); + break; + ++ case DW_OP_const2s: ++ /* push: 16-bit signed immediate */ ++ sw = read_le_s_encoded_literal( expr, 4 ); ++ expr += 2; ++ PUSH( ML_(CfiExpr_Const)( dst, (UWord)sw ) ); ++ if (ddump_frames) ++ VG_(printf)("DW_OP_const2s: %ld", sw); ++ break; ++ + case DW_OP_const1s: + /* push: 8-bit signed immediate */ + sw = read_le_s_encoded_literal( expr, 1 ); +@@ -2845,6 +2855,46 @@ + VG_(printf)("DW_OP_const1s: %ld", sw); + break; + ++ case DW_OP_const1u: ++ /* push: 8-bit unsigned immediate */ ++ uw = read_le_u_encoded_literal( expr, 1 ); ++ expr += 1; ++ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); ++ if (ddump_frames) ++ VG_(printf)("DW_OP_const1: %lu", uw); ++ break; ++ ++ case DW_OP_const2u: ++ /* push: 16-bit unsigned immediate */ ++ uw = read_le_u_encoded_literal( expr, 2 ); ++ expr += 2; ++ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); ++ if (ddump_frames) ++ VG_(printf)("DW_OP_const2: %lu", uw); ++ break; ++ ++ case DW_OP_const4u: ++ /* push: 32-bit unsigned immediate */ ++ uw = read_le_u_encoded_literal( expr, 4 ); ++ expr += 4; ++ PUSH( ML_(CfiExpr_Const)( dst, uw ) ); ++ if (ddump_frames) ++ VG_(printf)("DW_OP_const4: %lu", uw); ++ break; ++ ++ case DW_OP_abs: ++ uop = Cunop_Abs; opname = "abs"; goto unop; ++ case DW_OP_neg: ++ uop = Cunop_Neg; opname = "neg"; goto unop; ++ case DW_OP_not: ++ uop = Cunop_Not; opname = "not"; goto unop; ++ unop: ++ POP( ix ); ++ PUSH( ML_(CfiExpr_Unop)( dst, uop, ix ) ); ++ if (ddump_frames) ++ VG_(printf)("DW_OP_%s", opname); ++ break; ++ + case DW_OP_minus: + op = Cop_Sub; opname = "minus"; goto binop; + case DW_OP_plus: +--- valgrind/coregrind/m_debuginfo/debuginfo.c (revision 12990) ++++ valgrind/coregrind/m_debuginfo/debuginfo.c (working copy) +@@ -2051,7 +2051,7 @@ + UWord evalCfiExpr ( XArray* exprs, Int ix, + CfiExprEvalContext* eec, Bool* ok ) + { +- UWord wL, wR; ++ UWord w, wL, wR; + Addr a; + CfiExpr* e; + vg_assert(sizeof(Addr) == sizeof(UWord)); +@@ -2118,6 +2118,16 @@ + } + /* let's hope it doesn't trap! */ + return ML_(read_UWord)((void *)a); ++ case Cex_Unop: ++ w = evalCfiExpr( exprs, e->Cex.Unop.ix, eec, ok ); ++ if (!(*ok)) return 0; ++ switch (e->Cex.Unop.op) { ++ case Cunop_Abs: return (Word) w < 0 ? - w : w; ++ case Cunop_Neg: return - (Word) w; ++ case Cunop_Not: return ~ w; ++ default: goto unhandled; ++ } ++ /*NOTREACHED*/ + default: + goto unhandled; + } +--- valgrind/coregrind/m_debuginfo/storage.c (revision 12990) ++++ valgrind/coregrind/m_debuginfo/storage.c (working copy) +@@ -595,6 +595,16 @@ + e.Cex.Binop.ixR = ixR; + return (Int)VG_(addToXA)( dst, &e ); + } ++Int ML_(CfiExpr_Unop)( XArray* dst, CfiUnop op, Int ix ) ++{ ++ CfiExpr e; ++ VG_(memset)( &e, 0, sizeof(e) ); ++ e.tag = Cex_Unop; ++ e.Cex.Unop.op = op; ++ e.Cex.Unop.ix = ix; ++ return (Int)VG_(addToXA)( dst, &e ); ++} ++ + Int ML_(CfiExpr_CfiReg)( XArray* dst, CfiReg reg ) + { + CfiExpr e; +--- valgrind/coregrind/m_debuginfo/priv_storage.h (revision 12990) ++++ valgrind/coregrind/m_debuginfo/priv_storage.h (working copy) +@@ -296,6 +296,14 @@ + + typedef + enum { ++ Cunop_Abs=0x231, ++ Cunop_Neg, ++ Cunop_Not ++ } ++ CfiUnop; ++ ++typedef ++ enum { + Creg_IA_SP=0x213, + Creg_IA_BP, + Creg_IA_IP, +@@ -315,7 +323,8 @@ + Cex_Const, + Cex_Binop, + Cex_CfiReg, +- Cex_DwReg ++ Cex_DwReg, ++ Cex_Unop + } + CfiExprTag; + +@@ -342,6 +351,10 @@ + struct { + Int reg; + } DwReg; ++ struct { ++ CfiUnop op; ++ Int ix; ++ } Unop; + } + Cex; + } +@@ -353,6 +366,7 @@ + extern Int ML_(CfiExpr_Binop) ( XArray* dst, CfiOp op, Int ixL, Int ixR ); + extern Int ML_(CfiExpr_CfiReg)( XArray* dst, CfiReg reg ); + extern Int ML_(CfiExpr_DwReg) ( XArray* dst, Int reg ); ++extern Int ML_(CfiExpr_Unop) ( XArray* dst, CfiUnop op, Int ix ); + + extern void ML_(ppCfiExpr)( XArray* src, Int ix ); + diff --git a/valgrind-3.8.1-config_h.patch b/valgrind-3.8.1-config_h.patch new file mode 100644 index 0000000..47a498f --- /dev/null +++ b/valgrind-3.8.1-config_h.patch @@ -0,0 +1,11 @@ +--- valgrind/include/pub_tool_basics.h.jj 2011-10-26 23:24:32.000000000 +0200 ++++ valgrind/include/pub_tool_basics.h 2011-12-09 17:42:50.828630546 +0100 +@@ -297,7 +297,7 @@ static inline Bool sr_EQ ( SysRes sr1, S + #define VG_BUGS_TO "www.valgrind.org" + + /* Branch prediction hints. */ +-#if defined(__GNUC__) ++#if defined(__GNUC__) && (__GNUC__ >= 3) + # define LIKELY(x) __builtin_expect(!!(x), 1) + # define UNLIKELY(x) __builtin_expect(!!(x), 0) + #else diff --git a/valgrind-3.8.1-enable-armv5.patch b/valgrind-3.8.1-enable-armv5.patch new file mode 100644 index 0000000..2bc23b6 --- /dev/null +++ b/valgrind-3.8.1-enable-armv5.patch @@ -0,0 +1,22 @@ +--- valgrind/configure.in 2012-03-05 15:16:23.000000000 -0500 ++++ valgrind/configure.in 2012-03-05 13:49:04.000000000 -0500 +@@ -186,7 +186,7 @@ case "${host_cpu}" in + ARCH_MAX="s390x" + ;; + +- armv7*) ++ armv[57]*) + AC_MSG_RESULT([ok (${host_cpu})]) + ARCH_MAX="arm" + ;; +--- valgrind/configure 2012-03-05 15:16:23.000000000 -0500 ++++ valgrind/configure 2012-03-05 13:49:04.000000000 -0500 +@@ -5335,7 +5335,7 @@ + ARCH_MAX="s390x" + ;; + +- armv7*) ++ armv[57]*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})" >&5 + $as_echo "ok (${host_cpu})" >&6; } + ARCH_MAX="arm" diff --git a/valgrind-3.8.1-find-buildid.patch b/valgrind-3.8.1-find-buildid.patch new file mode 100644 index 0000000..078bdb0 --- /dev/null +++ b/valgrind-3.8.1-find-buildid.patch @@ -0,0 +1,42 @@ +--- valgrind/coregrind/m_debuginfo/readelf.c (revision 12871) ++++ valgrind/coregrind/m_debuginfo/readelf.c (working copy) +@@ -888,7 +888,7 @@ + * http://fedoraproject.org/wiki/RolandMcGrath/BuildID + */ + static +-Char *find_buildid(Addr image, UWord n_image, Bool rel_ok) ++Char *find_buildid(Addr image, UWord n_image, Bool rel_ok, Bool search_shdrs) + { + Char* buildid = NULL; + __attribute__((unused)) /* on Android, at least */ +@@ -930,7 +930,11 @@ + } + } + +- if (buildid || !rel_ok) ++ /* Normally we would only search shdrs for ET_REL files, but when ++ we search for a separate .debug file phdrs might not be there ++ (they are never loaded) or have been corrupted, so try again ++ against shdrs. */ ++ if (buildid || (!rel_ok && !search_shdrs)) + return buildid; + + for (i = 0; i < ehdr->e_shnum; i++) { +@@ -1074,7 +1078,7 @@ + return 0; + + if (buildid) { +- Char* debug_buildid = find_buildid(sr_Res(sres), *size, rel_ok); ++ Char* debug_buildid = find_buildid(sr_Res(sres), *size, rel_ok, True); + if (debug_buildid == NULL || VG_(strcmp)(buildid, debug_buildid) != 0) { + SysRes res = VG_(am_munmap_valgrind)(sr_Res(sres), *size); + vg_assert(!sr_isError(res)); +@@ -2274,7 +2278,7 @@ + vg_assert(dimage == 0 && n_dimage == 0); + + /* Look for a build-id */ +- buildid = find_buildid(oimage, n_oimage, False); ++ buildid = find_buildid(oimage, n_oimage, False, False); + + /* Look for a debug image */ + if (buildid != NULL || debuglink_img != NULL) { diff --git a/valgrind-3.8.1-helgrind-race-supp.patch b/valgrind-3.8.1-helgrind-race-supp.patch new file mode 100644 index 0000000..759d151 --- /dev/null +++ b/valgrind-3.8.1-helgrind-race-supp.patch @@ -0,0 +1,15 @@ +--- valgrind/glibc-2.34567-NPTL-helgrind.supp.jj 2009-08-19 15:37:48.000000000 +0200 ++++ valgrind/glibc-2.34567-NPTL-helgrind.supp 2009-10-21 16:46:31.000000000 +0200 +@@ -88,6 +88,12 @@ + obj:*/lib*/libpthread-2.*so* + } + { ++ helgrind-glibc2X-102a ++ Helgrind:Race ++ fun:mythread_wrapper ++ obj:*vgpreload_helgrind*.so ++} ++{ + helgrind-glibc2X-103 + Helgrind:Race + fun:pthread_cond_*@@GLIBC_2.* diff --git a/valgrind-3.8.1-ldso-supp.patch b/valgrind-3.8.1-ldso-supp.patch new file mode 100644 index 0000000..d7a42c7 --- /dev/null +++ b/valgrind-3.8.1-ldso-supp.patch @@ -0,0 +1,28 @@ +--- valgrind/glibc-2.X.supp.in.jj 2011-10-26 23:24:45.000000000 +0200 ++++ valgrind/glibc-2.X.supp.in 2012-05-07 10:55:20.395942656 +0200 +@@ -124,7 +124,7 @@ + glibc-2.5.x-on-SUSE-10.2-(PPC)-2a + Memcheck:Cond + fun:index +- obj:*ld-@GLIBC_VERSION@.*.so ++ obj:*ld-@GLIBC_VERSION@*.so + } + { + glibc-2.5.x-on-SuSE-10.2-(PPC)-2b +@@ -136,14 +136,14 @@ + glibc-2.5.5-on-SuSE-10.2-(PPC)-2c + Memcheck:Addr4 + fun:index +- obj:*ld-@GLIBC_VERSION@.*.so ++ obj:*ld-@GLIBC_VERSION@*.so + } + { + glibc-2.3.5-on-SuSE-10.1-(PPC)-3 + Memcheck:Addr4 + fun:*wordcopy_fwd_dest_aligned* + fun:mem*cpy +- obj:*lib*@GLIBC_VERSION@.*.so ++ obj:*lib*@GLIBC_VERSION@*.so + } + + { diff --git a/valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch b/valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch new file mode 100644 index 0000000..5a6390b --- /dev/null +++ b/valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch @@ -0,0 +1,11 @@ +--- valgrind/memcheck/mc_translate.c (revision 12883) ++++ valgrind/memcheck/mc_translate.c (revision 12884) +@@ -3313,6 +3313,8 @@ + case Iop_DivModS128to64: + return mkLazy2(mce, Ity_I128, vatom1, vatom2); + ++ case Iop_8HLto16: ++ return assignNew('V', mce, Ity_I16, binop(op, vatom1, vatom2)); + case Iop_16HLto32: + return assignNew('V', mce, Ity_I32, binop(op, vatom1, vatom2)); + case Iop_32HLto64: diff --git a/valgrind-3.8.1-openat.patch b/valgrind-3.8.1-openat.patch new file mode 100644 index 0000000..cb3a433 --- /dev/null +++ b/valgrind-3.8.1-openat.patch @@ -0,0 +1,38 @@ +Testcase: +#define _GNU_SOURCE +#include +#include + +int +main (void) +{ + int dfd = open ("/tmp", O_RDONLY); + int fd1 = openat (dfd, "abc", O_RDONLY); + int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY); + int fd3 = openat (AT_FDCWD, "abc", O_RDONLY); + /* This is the only one that should warn. */ + int fd4 = openat (0x12345678, "abc", O_RDONLY); + return 0; +} + +--- valgrind-3.8.1/coregrind/m_syswrap/syswrap-linux.c.jj 2007-12-11 00:18:43.000000000 +0100 ++++ valgrind-3.8.1/coregrind/m_syswrap/syswrap-linux.c 2008-03-03 11:35:15.000000000 +0100 +@@ -3308,10 +3308,15 @@ PRE(sys_openat) + int, dfd, const char *, filename, int, flags); + } + +- if (ARG1 != VKI_AT_FDCWD && !ML_(fd_allowed)(ARG1, "openat", tid, False)) ++ PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); ++ ++ /* For absolute filenames, dfd is ignored. If dfd is AT_FDCWD, ++ filename is relative to cwd. */ ++ if (ML_(safe_to_deref)( (void*)ARG2, 1 ) ++ && *(Char *)ARG2 != '/' ++ && ARG1 != VKI_AT_FDCWD ++ && !ML_(fd_allowed)(ARG1, "openat", tid, False)) + SET_STATUS_Failure( VKI_EBADF ); +- else +- PRE_MEM_RASCIIZ( "openat(filename)", ARG2 ); + + /* Handle the case where the open is of /proc/self/cmdline or + /proc//cmdline, and just give it a copy of the fd for the diff --git a/valgrind-3.8.1-pie.patch b/valgrind-3.8.1-pie.patch new file mode 100644 index 0000000..26c976b --- /dev/null +++ b/valgrind-3.8.1-pie.patch @@ -0,0 +1,40 @@ +From eb8d355b64e72bfdf1c8dd2534b1625d5d0118e0 Mon Sep 17 00:00:00 2001 +From: Dodji Seketeli +Date: Thu, 13 Jan 2011 16:04:39 +0100 +Subject: [PATCH] Fix crash loading certain binaries on ppc64 + +Increase the space left for VDSO on ppc64 compiled with 64KB page +size. the size of VDSO is at least 2 pages: one for the code and one +for the data. We ought to leave more than two page space then. The +patch leaves 8 pages space to comply with what is done already for 4KB +page sizes. +--- + coregrind/m_ume/elf.c | 10 ++++++---- + 1 files changed, 6 insertions(+), 4 deletions(-) + +--- valgrind/coregrind/m_ume/elf.c ++++ valgrind/coregrind/m_ume/elf.c +@@ -327,6 +327,7 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) + /* The kernel maps position-independent executables at TASK_SIZE*2/3; + duplicate this behavior as close as we can. */ + if (e->e.e_type == ET_DYN && ebase == 0) { ++ ESZ(Addr) hacky_load_address; + ebase = VG_PGROUNDDN(info->exe_base + + (info->exe_end - info->exe_base) * 2 / 3); + /* We really don't want to load PIEs at zero or too close. It +@@ -336,10 +337,11 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) + nonpointers. So, hackily, move it above 1MB. */ + /* Later .. is appears ppc32-linux tries to put [vdso] at 1MB, + which totally screws things up, because nothing else can go +- there. So bump the hacky load addess along by 0x8000, to +- 0x108000. */ +- if (ebase < 0x108000) +- ebase = 0x108000; ++ there. The size of [vdso] is around 2 or 3 pages, so bump ++ the hacky load addess along by 8 * VKI_PAGE_SIZE to be safe. */ ++ hacky_load_address = 0x100000 + 8 * VKI_PAGE_SIZE; ++ if (ebase < hacky_load_address) ++ ebase = hacky_load_address; + } + + info->phnum = e->e.e_phnum; diff --git a/valgrind-3.8.1-stat_h.patch b/valgrind-3.8.1-stat_h.patch new file mode 100644 index 0000000..628dd79 --- /dev/null +++ b/valgrind-3.8.1-stat_h.patch @@ -0,0 +1,48 @@ +--- valgrind/include/vki/vki-amd64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-amd64-linux.h 2010-01-20 04:41:52.662552000 -0500 +@@ -328,6 +328,9 @@ struct vki_stat { + long st_blksize; + long st_blocks; /* Number 512-byte blocks allocated. */ + ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- valgrind/include/vki/vki-x86-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-x86-linux.h 2010-01-20 04:42:19.649995000 -0500 +@@ -366,6 +366,9 @@ struct vki_stat { + unsigned long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- valgrind/include/vki/vki-ppc32-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-ppc32-linux.h 2010-01-20 04:42:44.861651000 -0500 +@@ -410,6 +410,9 @@ struct vki_stat { + long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; +--- valgrind/include/vki/vki-ppc64-linux.h.jj 2009-08-19 09:37:07.000000000 -0400 ++++ valgrind/include/vki/vki-ppc64-linux.h 2010-01-20 04:43:05.579922000 -0500 +@@ -446,6 +446,9 @@ struct vki_stat { + long st_size; + unsigned long st_blksize; + unsigned long st_blocks; ++#undef st_atime ++#undef st_mtime ++#undef st_ctime + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; diff --git a/valgrind-3.8.1-x86-backtrace.patch b/valgrind-3.8.1-x86-backtrace.patch new file mode 100644 index 0000000..17ff658 --- /dev/null +++ b/valgrind-3.8.1-x86-backtrace.patch @@ -0,0 +1,52 @@ +--- valgrind/coregrind/m_stacktrace.c.jj 2012-08-05 18:04:16.000000000 +0200 ++++ valgrind/coregrind/m_stacktrace.c 2012-08-10 12:13:46.069797051 +0200 +@@ -149,11 +149,23 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId + /* Try to derive a new (ip,sp,fp) triple from the current + set. */ + +- /* On x86, first try the old-fashioned method of following the +- %ebp-chain. Code which doesn't use this (that is, compiled +- with -fomit-frame-pointer) is not ABI compliant and so +- relatively rare. Besides, trying the CFI first almost always +- fails, and is expensive. */ ++ /* On x86 GCC 4.6 and later now defaults to -fomit-frame-pointer ++ together with emitting unwind info (-fasynchronous-unwind-tables). ++ So, try CF info first. */ ++ if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) { ++ if (0 == uregs.xip || 1 == uregs.xip) break; ++ if (sps) sps[i] = uregs.xsp; ++ if (fps) fps[i] = uregs.xbp; ++ ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */ ++ if (debug) ++ VG_(printf)(" ipsC[%d]=0x%08lx\n", i-1, ips[i-1]); ++ uregs.xip = uregs.xip - 1; ++ /* as per comment at the head of this loop */ ++ continue; ++ } ++ ++ /* And only then the old-fashioned method of following the ++ %ebp-chain. */ + /* Deal with frames resulting from functions which begin "pushl% + ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */ + if (fp_min <= uregs.xbp && +@@ -179,20 +191,6 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId + uregs.xip = uregs.xip - 1; + /* as per comment at the head of this loop */ + continue; +- } +- +- /* That didn't work out, so see if there is any CF info to hand +- which can be used. */ +- if ( VG_(use_CF_info)( &uregs, fp_min, fp_max ) ) { +- if (0 == uregs.xip || 1 == uregs.xip) break; +- if (sps) sps[i] = uregs.xsp; +- if (fps) fps[i] = uregs.xbp; +- ips[i++] = uregs.xip - 1; /* -1: refer to calling insn, not the RA */ +- if (debug) +- VG_(printf)(" ipsC[%d]=0x%08lx\n", i-1, ips[i-1]); +- uregs.xip = uregs.xip - 1; +- /* as per comment at the head of this loop */ +- continue; + } + + /* And, similarly, try for MSVC FPO unwind info. */ diff --git a/valgrind.spec b/valgrind.spec index 2d04240..817a119 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -2,8 +2,8 @@ Summary: Tool for finding memory management bugs in programs Name: %{?scl_prefix}valgrind -Version: 3.8.0 -Release: 8%{?dist} +Version: 3.8.1 +Release: 1%{?dist} Epoch: 1 License: GPLv2 URL: http://www.valgrind.org/ @@ -13,21 +13,45 @@ Group: Development/Debuggers BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2 -Patch1: valgrind-3.8.0-cachegrind-improvements.patch -Patch2: valgrind-3.8.0-openat.patch -Patch3: valgrind-3.8.0-helgrind-race-supp.patch -Patch4: valgrind-3.8.0-stat_h.patch -Patch5: valgrind-3.8.0-config_h.patch -Patch6: valgrind-3.8.0-capget.patch -Patch7: valgrind-3.8.0-pie.patch - -Patch9: valgrind-3.8.0-enable-armv5.patch -Patch10: valgrind-3.8.0-ldso-supp.patch -Patch11: valgrind-3.8.0-x86-backtrace.patch -Patch12: valgrind-3.8.0-find-buildid.patch -Patch13: valgrind-3.8.0-abbrev-parsing.patch -Patch14: valgrind-3.8.0-lzcnt-tzcnt-bugfix.patch -Patch15: valgrind-3.8.0-avx-alignment-check.patch + +Patch1: valgrind-3.8.1-cachegrind-improvements.patch + +# KDE#307103 - sys_openat If pathname is absolute, then dirfd is ignored. +Patch2: valgrind-3.8.1-openat.patch + +# KDE#211352 - helgrind races in helgrind's own mythread_wrapper +Patch3: valgrind-3.8.1-helgrind-race-supp.patch + +Patch4: valgrind-3.8.1-stat_h.patch + +# Support really ancient gcc. Check __GNUC__ >= 3 for __builtin_expect. +Patch5: valgrind-3.8.1-config_h.patch + +# KDE#307101 - sys_capget second argument can be NULL +Patch6: valgrind-3.8.1-capget.patch + +# KDE#263034 - Crash when loading some PPC64 binaries +Patch7: valgrind-3.8.1-pie.patch + +# configure detection change from armv7* to armv[57]*. +Patch8: valgrind-3.8.1-enable-armv5.patch + +Patch9: valgrind-3.8.1-ldso-supp.patch + +# On x86 GCC 4.6 and later now defaults to -fomit-frame-pointer +# together with emitting unwind info (-fasynchronous-unwind-tables). +# So, try CF info first. +Patch10: valgrind-3.8.1-x86-backtrace.patch + +# KDE#305431 - Use find_buildid shdr fallback for separate .debug files +Patch11: valgrind-3.8.1-find-buildid.patch + +# KDE#305513 - Robustify abbrev reading (part already upstream). +Patch12: valgrind-3.8.1-abbrev-parsing.patch + +# KDE#307038 - DWARF2 CFI reader: unhandled DW_OP_ opcode 0x8 (DW_OP_const1u) +Patch13: valgrind-3.8.1-cfi_dw_ops.patch + # KDE#305728 - Add support for AVX2, BMI1, BMI2 and FMA instructions # Combined patch for: @@ -49,16 +73,16 @@ Patch15: valgrind-3.8.0-avx-alignment-check.patch # ./none/tests/amd64/avx2-1.stderr.exp # ./none/tests/amd64/fma.stderr.exp # ./none/tests/amd64/bmi.stderr.exp -Patch16: valgrind-3.8.0-avx2-bmi-fma.patch.gz +Patch21: valgrind-3.8.1-avx2-bmi-fma.patch.gz # Small fixup for above patch, just a configure check. # This is equivalent to valgrind-bmi-5.patch from KDE#305728 -Patch17: valgrind-3.8.0-bmi-conf-check.patch +Patch22: valgrind-3.8.1-bmi-conf-check.patch # Partial backport of upstream revision 12884 without it AVX2 VPBROADCASTB # insn is broken under memcheck. -Patch18: valgrind-3.8.0-memcheck-mc_translate-Iop_8HLto16.patch -Patch19: valgrind-3.8.0-avx2-prereq.patch +Patch23: valgrind-3.8.1-memcheck-mc_translate-Iop_8HLto16.patch +# vgtest files should prereq that the binary is there (for old binutils). +Patch24: valgrind-3.8.1-avx2-prereq.patch -Patch20: valgrind-3.8.0-cfi_dw_ops.patch Obsoletes: valgrind-callgrind %ifarch x86_64 ppc64 @@ -150,6 +174,7 @@ for details. %prep %setup -q %{?scl:-n %{pkg_name}-%{version}} + %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -157,24 +182,21 @@ for details. %patch5 -p1 %patch6 -p1 %patch7 -p1 - +%patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 +# Add support for AVX2, BMI1, BMI2 and FMA instructions +%patch21 -p1 touch ./none/tests/amd64/avx2-1.stderr.exp touch ./none/tests/amd64/fma.stderr.exp touch ./none/tests/amd64/bmi.stderr.exp -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 - -%patch20 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -301,7 +323,7 @@ echo ===============END TESTING=============== %endif %changelog -* Thu Sep 20 2012 Mark Wielaard +* Thu Sep 20 2012 Mark Wielaard 3.8.1-1 - Add partial backport of upstream revision 12884 valgrind-3.8.0-memcheck-mc_translate-Iop_8HLto16.patch without it AVX2 VPBROADCASTB insn is broken under memcheck. @@ -312,6 +334,7 @@ echo ===============END TESTING=============== Makefile.in from valgrind-3.8.0-avx2-bmi-fma.patch.gz - Remove valgrind-3.8.0-tests.patch tests no longer hang. - Added SCL macros to support building as part of a Software Collection. +- Upgrade to valgrind 3.8.1. * Wed Sep 12 2012 Mark Wielaard 3.8.0-8 - Add configure fixup valgrind-3.8.0-bmi-conf-check.patch