3.13.0-13 - Add additional fix to valgrind-3.13.0-debug-alt-file.patch.

This commit is contained in:
Mark Wielaard 2018-01-03 00:57:48 +01:00
parent 14e6c2a500
commit 275b4b6503
2 changed files with 35 additions and 1 deletions

View File

@ -127,3 +127,34 @@ index e612250..c19ff21 100644
if (altfile_str_m)
ML_(dinfo_free)(altfile_str_m);
ML_(dinfo_free)(altbuildid);
diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c
index c19ff212b..70c28e629 100644
--- a/coregrind/m_debuginfo/readelf.c
+++ b/coregrind/m_debuginfo/readelf.c
@@ -1582,6 +1582,24 @@ static HChar* readlink_path (const HChar *path)
return NULL;
}
+ if (buf[0] == '/')
+ return buf;
+
+ /* Relative path, add link dir. */
+ HChar *linkdirptr;
+ SizeT linkdir_len = VG_(strlen)(path);
+ if ((linkdirptr = VG_(strrchr)(path, '/')) != NULL)
+ linkdir_len -= VG_(strlen)(linkdirptr + 1);
+
+ SizeT buflen = VG_(strlen)(buf);
+ SizeT needed = linkdir_len + buflen + 1;
+ if (bufsiz < needed)
+ buf = ML_(dinfo_realloc)("readlink_path.linkdir", buf, needed);
+
+ VG_(memmove)(buf + linkdir_len, buf, buflen);
+ VG_(memcpy)(buf, path, linkdir_len);
+ buf[needed - 1] = '\0';
+
return buf;
}

View File

@ -3,7 +3,7 @@
Summary: Tool for finding memory management bugs in programs
Name: %{?scl_prefix}valgrind
Version: 3.13.0
Release: 12%{?dist}
Release: 13%{?dist}
Epoch: 1
License: GPLv2+
URL: http://www.valgrind.org/
@ -488,6 +488,9 @@ echo ===============END TESTING===============
%endif
%changelog
* Tue Jan 2 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-13
- Add additional fix to valgrind-3.13.0-debug-alt-file.patch.
* Tue Dec 12 2017 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-12
- Add valgrind-3.13.0-s390-cgijnl.patch.
- Use upstream version of valgrind-3.13.0-debug-alt-file.patch.