From e1e5e5d093da7dc8ec698c2be93fac7c4f16c4aa Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Jun 06 2017 09:35:19 +0000 Subject: 3.13.0-0.2.RC1 - Add valgrind-3.13.0-arm-dcache.patch - Add valgrind-3.13.0-g++-4.4.patch - Add valgrind-3.13.0-s390x-GI-strcspn.patch - Add valgrind-3.13.0-xtree-callgrind.patch --- diff --git a/valgrind-3.13.0-arm-dcache.patch b/valgrind-3.13.0-arm-dcache.patch new file mode 100644 index 0000000..b1774f9 --- /dev/null +++ b/valgrind-3.13.0-arm-dcache.patch @@ -0,0 +1,13 @@ +diff --git a/coregrind/m_libcproc.c b/coregrind/m_libcproc.c +index 18bef06..afcc117 100644 +--- a/coregrind/m_libcproc.c ++++ b/coregrind/m_libcproc.c +@@ -1208,7 +1208,7 @@ void VG_(flush_dcache) ( void *ptr, SizeT nbytes ) + cls = 4 * (1ULL << (0xF & (ctr_el0 >> 16))); + + /* Stay sane .. */ +- vg_assert(cls == 64); ++ vg_assert(cls == 64 || cls == 128); + + startaddr &= ~(cls - 1); + for (addr = startaddr; addr < endaddr; addr += cls) { diff --git a/valgrind-3.13.0-g++-4.4.patch b/valgrind-3.13.0-g++-4.4.patch new file mode 100644 index 0000000..2308a1c --- /dev/null +++ b/valgrind-3.13.0-g++-4.4.patch @@ -0,0 +1,30 @@ +commit 0d4a917777828f652fcc8e41c6051100052c9d14 +Author: mjw +Date: Tue Jun 6 09:03:03 2017 +0000 + + Fix pub_tool_basics.h build issue with g++ 4.4.7. + + g++ 4.4.7 doesn't accept union field initializers: + In file included from ../../include/pub_tool_vki.h:50, + from valgrind_cpp_test.cpp:13: + ../../include/vki/vki-linux.h: In function ‘vki_cmsghdr* __vki_cmsg_nxthdr(void*, __vki_kernel_size_t, vki_cmsghdr*)’: + ../../include/vki/vki-linux.h:673: error: expected primary-expression before ‘.’ token + + Assign value after declaration which works for any g++ version. + + git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16437 a5019735-40e9-0310-863c-91ae7b9d1cf9 + +diff --git a/include/pub_tool_basics.h b/include/pub_tool_basics.h +index 64e1929..e3af283 100644 +--- a/include/pub_tool_basics.h ++++ b/include/pub_tool_basics.h +@@ -480,7 +480,8 @@ static inline Bool sr_EQ ( UInt sysno, SysRes sr1, SysRes sr2 ) { + union { \ + void *in; \ + D out; \ +- } var = {.in = (void *) (x)}; var.out; \ ++ } var; \ ++ var.in = (void *) (x); var.out; \ + }) + + // Poor man's static assert diff --git a/valgrind-3.13.0-s390x-GI-strcspn.patch b/valgrind-3.13.0-s390x-GI-strcspn.patch new file mode 100644 index 0000000..9c932b4 --- /dev/null +++ b/valgrind-3.13.0-s390x-GI-strcspn.patch @@ -0,0 +1,13 @@ +diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c +index 74afa4b..f2875fc 100644 +--- a/shared/vg_replace_strmem.c ++++ b/shared/vg_replace_strmem.c +@@ -1721,6 +1721,7 @@ static inline void my_exit ( int x ) + + #if defined(VGO_linux) + STRCSPN(VG_Z_LIBC_SONAME, strcspn) ++ STRCSPN(VG_Z_LIBC_SONAME, __GI_strcspn) + + #elif defined(VGO_darwin) + + diff --git a/valgrind-3.13.0-xtree-callgrind.patch b/valgrind-3.13.0-xtree-callgrind.patch new file mode 100644 index 0000000..fa1f401 --- /dev/null +++ b/valgrind-3.13.0-xtree-callgrind.patch @@ -0,0 +1,84 @@ +commit 7474e777839a0bbfcbfdae18864e5654a163d240 +Author: philippe +Date: Fri Jun 2 21:15:04 2017 +0000 + + Fix 380200 - xtree generated callgrind files refer to files without directory name + + Patch from Matthias Schwarzott, slightly modified + + + + git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16435 a5019735-40e9-0310-863c-91ae7b9d1cf9 + +diff --git a/coregrind/m_xtree.c b/coregrind/m_xtree.c +index 379a638..98d36bb 100644 +--- a/coregrind/m_xtree.c ++++ b/coregrind/m_xtree.c +@@ -433,6 +433,10 @@ void VG_(XT_callgrind_print) + VgFile* fp = xt_open(outfilename); + DedupPoolAlloc* fnname_ddpa; + DedupPoolAlloc* filename_ddpa; ++ HChar* filename_buf = NULL; ++ UInt filename_buf_size = 0; ++ const HChar* filename_dir; ++ const HChar* filename_name; + + if (fp == NULL) + return; +@@ -489,23 +493,43 @@ void VG_(XT_callgrind_print) + + const HChar* img = img_value(VG_(indexXA)(xt->data, xecu)); + +- // CALLED_FLF gets the Filename/Line number/Function name for ips[n] ++ // CALLED_FLF gets the Dir+Filename/Line number/Function name for ips[n] ++ // in the variables called_filename/called_linenum/called_fnname. ++ // The booleans called_filename_new/called_fnname_new are set to True ++ // the first time the called_filename/called_fnname are encountered. ++ // The called_filename_nr/called_fnname_nr are numbers identifying ++ // the strings called_filename/called_fnname. + #define CALLED_FLF(n) \ + if ((n) < 0 \ + || !VG_(get_filename_linenum)(ips[(n)], \ +- &called_filename, \ +- NULL, \ ++ &filename_name, \ ++ &filename_dir, \ + &called_linenum)) { \ +- called_filename = "UnknownFile???"; \ ++ filename_name = "UnknownFile???"; \ + called_linenum = 0; \ + } \ + if ((n) < 0 \ + || !VG_(get_fnname)(ips[(n)], &called_fnname)) { \ + called_fnname = "UnknownFn???"; \ + } \ ++ { \ ++ UInt needed_size = VG_(strlen)(filename_dir) + 1 \ ++ + VG_(strlen)(filename_name) + 1; \ ++ if (filename_buf_size < needed_size) { \ ++ filename_buf_size = needed_size; \ ++ filename_buf = VG_(realloc)(xt->cc, filename_buf, \ ++ filename_buf_size); \ ++ } \ ++ } \ ++ VG_(strcpy)(filename_buf, filename_dir); \ ++ if (filename_buf[0] != '\0') { \ ++ VG_(strcat)(filename_buf, "/"); \ ++ } \ ++ VG_(strcat)(filename_buf, filename_name); \ + called_filename_nr = VG_(allocStrDedupPA)(filename_ddpa, \ +- called_filename, \ ++ filename_buf, \ + &called_filename_new); \ ++ called_filename = filename_buf; \ + called_fnname_nr = VG_(allocStrDedupPA)(fnname_ddpa, \ + called_fnname, \ + &called_fnname_new); +@@ -579,6 +603,7 @@ void VG_(XT_callgrind_print) + VG_(fclose)(fp); + VG_(deleteDedupPA)(fnname_ddpa); + VG_(deleteDedupPA)(filename_ddpa); ++ VG_(free)(filename_buf); + } + + diff --git a/valgrind.spec b/valgrind.spec index 786214c..154b7bb 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.13.0 -Release: 0.1.RC1%{?dist} +Release: 0.2.RC1%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -69,6 +69,18 @@ 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#380397 s390x: __GI_strcspn() replacemenet needed +Patch4: valgrind-3.13.0-s390x-GI-strcspn.patch + +# valgrind svn 16437 Fix pub_tool_basics.h build issue with g++ 4.4.7. +Patch5: valgrind-3.13.0-g++-4.4.patch + +# KDE#380200 xtree generated callgrind files refer to files without directory +Patch6: valgrind-3.13.0-xtree-callgrind.patch + +# KDE#380202 Assertion failure for cache line size on aarch64 +Patch7: valgrind-3.13.0-arm-dcache.patch + %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so @@ -184,6 +196,10 @@ Valgrind User Manual for details. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -381,6 +397,12 @@ echo ===============END TESTING=============== %endif %changelog +* Tue Jun 6 2017 Mark Wielaard - 3.13.0-0.2.RC1 +- Add valgrind-3.13.0-arm-dcache.patch +- Add valgrind-3.13.0-g++-4.4.patch +- Add valgrind-3.13.0-s390x-GI-strcspn.patch +- Add valgrind-3.13.0-xtree-callgrind.patch + * Fri Jun 2 2017 Mark Wielaard - 3.13.0-0.1.RC1 - Update description as suggested by Ivo Raisr. - Workaround gdb/python bug in testsuite (#1434601)