3.11.0-14 - Update valgrind-3.11.0-x86_unwind.patch
This commit is contained in:
parent
523f8250a2
commit
c283c1839c
@ -107,3 +107,61 @@ index 8c1e9a4..137e780 100644
|
||||
}
|
||||
goto unwind_done;
|
||||
} else {
|
||||
commit 4520d562975820aced0fda6ed503379f337da66e
|
||||
Author: philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Wed Feb 17 22:41:14 2016 +0000
|
||||
|
||||
Fix incorrect (or infinite loop) unwind on RHEL7 amd64 64 bits.
|
||||
|
||||
Same kind of problems as explained and fixed in revision 15720:
|
||||
In some cases, unwinding always retrieves the same pc/sp/bp.
|
||||
|
||||
Fix for 64 bits is similar: stop unwinding if the previous sp is >= new sp
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15794 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c
|
||||
index 137e780..ef4984c 100644
|
||||
--- a/coregrind/m_stacktrace.c
|
||||
+++ b/coregrind/m_stacktrace.c
|
||||
@@ -607,16 +607,25 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known,
|
||||
* next function which is completely wrong.
|
||||
*/
|
||||
while (True) {
|
||||
+ Addr old_xsp;
|
||||
|
||||
if (i >= max_n_ips)
|
||||
break;
|
||||
|
||||
+ old_xsp = uregs.xsp;
|
||||
+
|
||||
/* Try to derive a new (ip,sp,fp) triple from the current set. */
|
||||
|
||||
/* First off, see if there is any CFI 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 (old_xsp >= uregs.xsp) {
|
||||
+ if (debug)
|
||||
+ VG_(printf) (" CF end of stack old_xsp %p >= xsp %p\n",
|
||||
+ (void*)old_xsp, (void*)uregs.xsp);
|
||||
+ 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 */
|
||||
@@ -646,6 +655,12 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known,
|
||||
if (0 == uregs.xip || 1 == uregs.xip) break;
|
||||
uregs.xsp = uregs.xbp + sizeof(Addr) /*saved %rbp*/
|
||||
+ sizeof(Addr) /*ra*/;
|
||||
+ if (old_xsp >= uregs.xsp) {
|
||||
+ if (debug)
|
||||
+ VG_(printf) (" FF end of stack old_xsp %p >= xsp %p\n",
|
||||
+ (void*)old_xsp, (void*)uregs.xsp);
|
||||
+ break;
|
||||
+ }
|
||||
uregs.xbp = (((UWord*)uregs.xbp)[0]);
|
||||
if (sps) sps[i] = uregs.xsp;
|
||||
if (fps) fps[i] = uregs.xbp;
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: Tool for finding memory management bugs in programs
|
||||
Name: %{?scl_prefix}valgrind
|
||||
Version: 3.11.0
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
URL: http://www.valgrind.org/
|
||||
@ -96,6 +96,7 @@ Patch15: valgrind-3.11.0-socketcall-x86-linux.patch
|
||||
Patch16: valgrind-3.11.0-is_stmt.patch
|
||||
|
||||
# Fix incorrect (or infinite loop) unwind on RHEL7 x86 32 bits. (svn r15729)
|
||||
# Fix incorrect (or infinite loop) unwind on RHEL7 amd64 64 bits. (svn r15794)
|
||||
Patch17: valgrind-3.11.0-x86_unwind.patch
|
||||
|
||||
# KDE#358478 drd/tests/std_thread.cpp doesn't build with GCC6
|
||||
@ -423,8 +424,9 @@ echo ===============END TESTING===============
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Feb 18 2016 Mark Wielaard <mjw@redhat.com>
|
||||
- Update valgrind-3.11.0-futex.patch.
|
||||
* Thu Feb 18 2016 Mark Wielaard <mjw@redhat.com> - 3.11.0-14
|
||||
- Update valgrind-3.11.0-futex.patch (fix helgrind/drd regression).
|
||||
- Update valgrind-3.11.0-x86_unwind.patch (include amd64 fix).
|
||||
|
||||
* Wed Feb 17 2016 Mark Wielaard <mjw@redhat.com> - 3.11.0-13
|
||||
- Remove valgrind-3.11.0-no-stv.patch (gcc6 has been fixed).
|
||||
|
Loading…
Reference in New Issue
Block a user