- update to 3.14.0 (bsc#1114575, FATE#326355):

see http://www.valgrind.org/docs/manual/dist.news.html
  * The new option --keep-debuginfo=no|yes (default no) can be used to retain
    debug info for unloaded code.  This allows saved stack traces (e.g. for
    memory leaks) to include file/line info for code that has been dlclose'd (or
    similar).  See the user manual for more information and known limitations.
  * Ability to specify suppressions based on source file name and line number.
  * Majorly overhauled register allocator.  No end-user changes, but the JIT
    generates code a bit more quickly now.
  * Preliminary support for macOS 10.13 has been added.
  * mips: support for MIPS32/MIPS64 Revision 6 has been added.
  * mips: support for MIPS SIMD architecture (MSA) has been added.
  * mips: support for MIPS N32 ABI has been added.
  * s390: partial support for vector instructions (integer and string) has been
    added.
  * Helgrind: Addition of a flag
    --delta-stacktrace=no|yes [yes on linux amd64/x86]
    which specifies how full history stack traces should be computed.
    Setting this to =yes can speed up Helgrind by 25% when using
    --history-level=full.
  * Memcheck: reduced false positive rate for optimised code created by Clang 6
    / LLVM 6 on x86, amd64 and arm64.  In particular, Memcheck analyses code
    blocks more carefully to determine where it can avoid expensive definedness
    checks without loss of precision.  This is controlled by the flag
    --expensive-definedness-checks=no|auto|yes [auto].
  * Valgrind is now buildable with link-time optimisation (LTO).  A new
    configure option --enable-lto=yes allows building Valgrind with LTO.  If the
    toolchain supports it, this produces a smaller/faster Valgrind (up to 10%).
    Note that if you are doing Valgrind development, --enable-lto=yes massively
    slows down the build process.

OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=173
This commit is contained in:
Dirk Mueller 2018-11-21 12:11:24 +00:00 committed by Git OBS Bridge
parent 1fca18412e
commit bbd92e39b8
8 changed files with 4199 additions and 1502 deletions

View File

@ -1,102 +0,0 @@
From cb72566ac3af13889f7ae88068c3b3ee6a6b757b Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Thu, 12 Jul 2018 13:56:00 +0200
Subject: [PATCH] Accept read-only PT_LOAD segments and .rodata.
The new binutils ld -z separate-code option creates multiple read-only
PT_LOAD segments and might place .rodata in a non-executable segment.
Allow and keep track of separate read-only segments and allow a readonly
page with .rodata section.
Based on patches from Tom Hughes <tom@compton.nu> and
H.J. Lu <hjl.tools@gmail.com>.
https://bugs.kde.org/show_bug.cgi?id=395682
[sbruens] Backported to 3.13.0 release
---
coregrind/m_debuginfo/debuginfo.c | 2 --
coregrind/m_debuginfo/readelf.c | 34 +++++++++++++++++++++++--------
2 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c
index 24814d8..2cf433a 100644
--- a/coregrind/m_debuginfo/debuginfo.c
+++ b/coregrind/m_debuginfo/debuginfo.c
@@ -957,9 +957,7 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd )
# error "Unknown platform"
# endif
-# if defined(VGP_x86_darwin) && DARWIN_VERS >= DARWIN_10_7
is_ro_map = seg->hasR && !seg->hasW && !seg->hasX;
-# endif
# if defined(VGO_solaris)
is_rx_map = seg->hasR && seg->hasX && !seg->hasW;
diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c
index 3c8e62b..34a40c9 100644
--- a/coregrind/m_debuginfo/readelf.c
+++ b/coregrind/m_debuginfo/readelf.c
@@ -1785,7 +1785,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
Bool loaded = False;
for (j = 0; j < VG_(sizeXA)(di->fsm.maps); j++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, j);
- if ( (map->rx || map->rw)
+ if ( (map->rx || map->rw || map->ro)
&& map->size > 0 /* stay sane */
&& a_phdr.p_offset >= map->foff
&& a_phdr.p_offset < map->foff + map->size
@@ -1816,6 +1816,16 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
i, (UWord)item.bias);
loaded = True;
}
+ if (map->ro
+ && (a_phdr.p_flags & (PF_R | PF_W | PF_X))
+ == PF_R) {
+ item.exec = False;
+ VG_(addToXA)(svma_ranges, &item);
+ TRACE_SYMTAB(
+ "PT_LOAD[%ld]: acquired as ro, bias 0x%lx\n",
+ i, (UWord)item.bias);
+ loaded = True;
+ }
}
}
if (!loaded) {
@@ -2083,17 +2093,25 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
}
}
- /* Accept .rodata where mapped as rx (data), even if zero-sized */
+ /* Accept .rodata where mapped as rx or rw (data), even if zero-sized */
if (0 == VG_(strcmp)(name, ".rodata")) {
- if (inrx && !di->rodata_present) {
- di->rodata_present = True;
+ if (!di->rodata_present) {
di->rodata_svma = svma;
- di->rodata_avma = svma + inrx->bias;
+ di->rodata_avma = svma;
di->rodata_size = size;
- di->rodata_bias = inrx->bias;
di->rodata_debug_svma = svma;
- di->rodata_debug_bias = inrx->bias;
- /* NB was 'inrw' prior to r11794 */
+ if (inrx) {
+ di->rodata_avma += inrx->bias;
+ di->rodata_bias = inrx->bias;
+ di->rodata_debug_bias = inrx->bias;
+ } else if (inrw) {
+ di->rodata_avma += inrw->bias;
+ di->rodata_bias = inrw->bias;
+ di->rodata_debug_bias = inrw->bias;
+ } else {
+ BAD(".rodata");
+ }
+ di->rodata_present = True;
TRACE_SYMTAB("acquiring .rodata svma = %#lx .. %#lx\n",
di->rodata_svma,
di->rodata_svma + di->rodata_size - 1);
--
2.18.0

View File

@ -1,115 +0,0 @@
From 6a55b1e82ccda3f0d663d2cc89eb543ae2d096bf Mon Sep 17 00:00:00 2001
From: Carl Love <carll@us.ibm.com>
Date: Tue, 31 Oct 2017 13:45:28 -0500
Subject: [PATCH] Fix access to time base register to return 64-bits.
---
NEWS | 1 +
VEX/priv/guest_ppc_toIR.c | 70 +++++++++++++++++++++++++++++++++++++----------
2 files changed, 56 insertions(+), 15 deletions(-)
--- valgrind-3.13.0/NEWS 2017-06-15 15:37:40.000000000 +0200
+++ valgrind-3.13.0/NEWS 2018-09-25 12:08:56.395509577 +0200
@@ -250,6 +250,7 @@
380200 xtree generated callgrind files refer to files without directory name
380202 Assertion failure for cache line size (cls == 64) on aarch64.
380397 s390x: __GI_strcspn() replacement needed
+386397 PPC64, valgrind truncates powerpc timebase to 32-bits.
n-i-bz Fix pub_tool_basics.h build issue with g++ 4.4.7.
(3.13.0.RC1: 2 June 2017, vex r3386, valgrind r16434)
diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c
index f63146e7e256..4ec37f5f994f 100644
--- a/VEX/priv/guest_ppc_toIR.c
+++ b/VEX/priv/guest_ppc_toIR.c
@@ -9419,26 +9419,60 @@ static Bool dis_proc_ctl ( const VexAbiInfo* vbi, UInt theInstr )
putIReg( rD_addr, getGST( PPC_GST_SPRG3_RO ) );
break;
- /* Even a lowly PPC7400 can run the associated helper, so no
- obvious need for feature testing at this point. */
- case 268 /* 0x10C */:
- case 269 /* 0x10D */: {
- UInt arg = SPR==268 ? 0 : 1;
- IRTemp val = newTemp(Ity_I32);
- IRExpr** args = mkIRExprVec_1( mkU32(arg) );
+ case 268 /* 0x10C TB - 64 bit time base register */:
+ {
+ IRTemp val = newTemp(Ity_I64);
+ IRExpr** args = mkIRExprVec_0();
IRDirty* d = unsafeIRDirty_1_N(
- val,
- 0/*regparms*/,
- "ppc32g_dirtyhelper_MFSPR_268_269",
- fnptr_to_fnentry
- (vbi, &ppc32g_dirtyhelper_MFSPR_268_269),
- args
- );
+ val,
+ 0/*regparms*/,
+ "ppcg_dirtyhelper_MFTB",
+ fnptr_to_fnentry(vbi,
+ &ppcg_dirtyhelper_MFTB),
+ args );
+ /* execute the dirty call, dumping the result in val. */
+ stmt( IRStmt_Dirty(d) );
+ putIReg( rD_addr, (mode64) ? mkexpr(val) :
+ unop(Iop_64to32, mkexpr(val)) );
+
+ break;
+ }
+ case 269 /* 0x10D TBU - upper 32-bits of time base register */:
+ {
+ DIP("mfspr r%u,%u", rD_addr, SPR);
+ IRTemp val = newTemp(Ity_I64);
+ IRExpr** args = mkIRExprVec_0();
+ IRDirty* d = unsafeIRDirty_1_N(
+ val,
+ 0/*regparms*/,
+ "ppcg_dirtyhelper_MFTB",
+ fnptr_to_fnentry(vbi,
+ &ppcg_dirtyhelper_MFTB),
+ args );
/* execute the dirty call, dumping the result in val. */
stmt( IRStmt_Dirty(d) );
putIReg( rD_addr,
- mkWidenFrom32(ty, mkexpr(val), False/*unsigned*/) );
+ mkWidenFrom32(ty, unop(Iop_64HIto32, mkexpr(val)),
+ /* Signed */False) );
+ break;
+ }
+ case 284 /* 0x1 TBL - lower 32-bits of time base register */:
+ {
DIP("mfspr r%u,%u", rD_addr, SPR);
+ IRTemp val = newTemp(Ity_I64);
+ IRExpr** args = mkIRExprVec_0();
+ IRDirty* d = unsafeIRDirty_1_N(
+ val,
+ 0/*regparms*/,
+ "ppcg_dirtyhelper_MFTB",
+ fnptr_to_fnentry(vbi,
+ &ppcg_dirtyhelper_MFTB),
+ args );
+ /* execute the dirty call, dumping the result in val. */
+ stmt( IRStmt_Dirty(d) );
+ putIReg( rD_addr,
+ mkWidenFrom32(ty, unop(Iop_64to32, mkexpr(val)),
+ /* Signed */False) );
break;
}
@@ -9493,6 +9527,12 @@ static Bool dis_proc_ctl ( const VexAbiInfo* vbi, UInt theInstr )
putIReg( rD_addr, (mode64) ? mkexpr(val) :
unop(Iop_64to32, mkexpr(val)) );
break;
+ case 284:
+ DIP("mftbl r%u", rD_addr);
+ putIReg( rD_addr,
+ mkWidenFrom32(ty, unop(Iop_64to32, mkexpr(val)),
+ /* Signed */False) );
+ break;
default:
return False; /* illegal instruction */
}
--
2.13.7

View File

@ -1,35 +0,0 @@
backport of https://bugs.kde.org/show_bug.cgi?id=381289
see https://bugzilla.suse.com/show_bug.cgi?id=1064958
--- coregrind/m_syswrap/syswrap-linux.c (revision 16470)
+++ coregrind/m_syswrap/syswrap-linux.c (working copy)
@@ -1901,7 +1901,7 @@ PRE(sys_epoll_pwait)
int, maxevents, int, timeout, vki_sigset_t *, sigmask,
vki_size_t, sigsetsize);
PRE_MEM_WRITE( "epoll_pwait(events)", ARG2, sizeof(struct vki_epoll_event)*ARG3);
- if (ARG4)
+ if (ARG5)
PRE_MEM_READ( "epoll_pwait(sigmask)", ARG5, sizeof(vki_sigset_t) );
}
POST(sys_epoll_pwait)
Index: memcheck/tests/linux/syscalls-2007.c
===================================================================
--- memcheck/tests/linux/syscalls-2007.c (revision 16470)
+++ memcheck/tests/linux/syscalls-2007.c (working copy)
@@ -79,5 +79,16 @@ int main (void)
}
#endif
+#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_EPOLL_PWAIT)
+ {
+ int fd3;
+ struct epoll_event evs[10];
+
+ fd3 = epoll_create (10);
+ /* epoll_pwait can take a NULL sigmask. */
+ epoll_pwait (fd3, evs, 10, 1, NULL);
+ }
+#endif
+
return 0;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b
size 14723076

3
valgrind-3.14.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5
size 16602858

View File

@ -1,3 +1,40 @@
-------------------------------------------------------------------
Wed Nov 21 11:51:45 UTC 2018 - Dirk Mueller <dmueller@suse.com>
- update to 3.14.0 (bsc#1114575, FATE#326355):
see http://www.valgrind.org/docs/manual/dist.news.html
* The new option --keep-debuginfo=no|yes (default no) can be used to retain
debug info for unloaded code. This allows saved stack traces (e.g. for
memory leaks) to include file/line info for code that has been dlclose'd (or
similar). See the user manual for more information and known limitations.
* Ability to specify suppressions based on source file name and line number.
* Majorly overhauled register allocator. No end-user changes, but the JIT
generates code a bit more quickly now.
* Preliminary support for macOS 10.13 has been added.
* mips: support for MIPS32/MIPS64 Revision 6 has been added.
* mips: support for MIPS SIMD architecture (MSA) has been added.
* mips: support for MIPS N32 ABI has been added.
* s390: partial support for vector instructions (integer and string) has been
added.
* Helgrind: Addition of a flag
--delta-stacktrace=no|yes [yes on linux amd64/x86]
which specifies how full history stack traces should be computed.
Setting this to =yes can speed up Helgrind by 25% when using
--history-level=full.
* Memcheck: reduced false positive rate for optimised code created by Clang 6
/ LLVM 6 on x86, amd64 and arm64. In particular, Memcheck analyses code
blocks more carefully to determine where it can avoid expensive definedness
checks without loss of precision. This is controlled by the flag
--expensive-definedness-checks=no|auto|yes [auto].
* Valgrind is now buildable with link-time optimisation (LTO). A new
configure option --enable-lto=yes allows building Valgrind with LTO. If the
toolchain supports it, this produces a smaller/faster Valgrind (up to 10%).
Note that if you are doing Valgrind development, --enable-lto=yes massively
slows down the build process.
- remove epoll-wait-fix.patch,
Fix-access-to-time-base-register-to-return-64-bits.patch,
0001-Accept-read-only-PT_LOAD-segments-and-.rodata.patch (upstream),
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 25 16:32:22 UTC 2018 - Michal Suchanek <msuchanek@suse.com> Tue Sep 25 16:32:22 UTC 2018 - Michal Suchanek <msuchanek@suse.com>

View File

@ -22,24 +22,19 @@
%define building_docs 1 %define building_docs 1
Name: valgrind Name: valgrind
Version: 3.13.0 Version: 3.14.0
Release: 0 Release: 0
Summary: Memory Management Debugger Summary: Memory Management Debugger
License: GPL-2.0-or-later License: GPL-2.0-or-later
Group: Development/Tools/Debuggers Group: Development/Tools/Debuggers
Url: http://valgrind.org/ Url: http://valgrind.org/
Source0: ftp://sourceware.org/pub/valgrind/valgrind-%{version}.tar.bz2 Source0: ftp://sourceware.org/pub/valgrind/valgrind-%{version}.tar.bz2
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_5_0 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_5_BRANCH > 3_5_BRANCH.diff # https://bugs.kde.org/show_bug.cgi?id=390553
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_5_0 svn://svn.valgrind.org/vex/branches/VEX_3_5_BRANCH > VEX_3_5_BRANCH.diff # https://github.com/olafhering/valgrind/compare/olh-base-master...olh-fixes-master
Patch0: valgrind.xen.patch Patch0: valgrind.xen.patch
Patch1: jit-register-unregister.diff Patch1: jit-register-unregister.diff
Patch2: armv6-support.diff Patch2: armv6-support.diff
Patch3: epoll-wait-fix.patch
Patch4: Implement-emulated-system-registers.-Fixes-392146.patch Patch4: Implement-emulated-system-registers.-Fixes-392146.patch
# PATCH-FIX-UPSTREAM [backport] - https://sourceware.org/git/?p=valgrind.git;a=commit;h=64aa729bfae71561505a40c12755bd6b55bb3061
Patch5: 0001-Accept-read-only-PT_LOAD-segments-and-.rodata.patch
# PATCH-FIX-UPSTREAM - https://sourceware.org/git/?p=valgrind.git;a=commit;h=6a55b1e82ccda3f0d663d2cc89eb543ae2d096bf
Patch6: Fix-access-to-time-base-register-to-return-64-bits.patch
BuildRequires: automake BuildRequires: automake
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: docbook_4 BuildRequires: docbook_4
@ -110,10 +105,7 @@ but it has been successfully used to optimize several KDE applications.
# needs porting to 3.11 # needs porting to 3.11
##%patch1 ##%patch1
%patch2 %patch2
%patch3
%patch4 -p1 %patch4 -p1
%patch5 -p1
%patch6 -p1
%build %build
export FLAGS="%{optflags}" export FLAGS="%{optflags}"
@ -135,6 +127,7 @@ autoreconf -fi
export GDB=%{_bindir}/gdb export GDB=%{_bindir}/gdb
%configure \ %configure \
--enable-lto=yes \
%ifarch aarch64 %ifarch aarch64
--enable-only64bit --enable-only64bit
%endif %endif

File diff suppressed because it is too large Load Diff