From 275b4b6503dbad062bd103ed868c9c57dcfdfe1b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Jan 02 2018 23:57:48 +0000 Subject: 3.13.0-13 - Add additional fix to valgrind-3.13.0-debug-alt-file.patch. --- diff --git a/valgrind-3.13.0-debug-alt-file.patch b/valgrind-3.13.0-debug-alt-file.patch index 050b5a7..9176bb1 100644 --- a/valgrind-3.13.0-debug-alt-file.patch +++ b/valgrind-3.13.0-debug-alt-file.patch @@ -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; + } + + diff --git a/valgrind.spec b/valgrind.spec index 10c6446..2d02dcf 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: 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 - 3.13.0-13 +- Add additional fix to valgrind-3.13.0-debug-alt-file.patch. + * Tue Dec 12 2017 Mark Wielaard - 3.13.0-12 - Add valgrind-3.13.0-s390-cgijnl.patch. - Use upstream version of valgrind-3.13.0-debug-alt-file.patch.