From 5918a28d8dfbf8cfbfe8dc0a40bcd595dda34bbd Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Nov 20 2013 13:33:00 +0000 Subject: Add valgrind-3.9.0-dwz-alt-buildid.patch. --- diff --git a/valgrind-3.9.0-dwz-alt-buildid.patch b/valgrind-3.9.0-dwz-alt-buildid.patch new file mode 100644 index 0000000..ce30e3b --- /dev/null +++ b/valgrind-3.9.0-dwz-alt-buildid.patch @@ -0,0 +1,26 @@ +commit 568d77ce8e0a508fbbd9e71e9938d6dab1639912 +Author: mjw +Date: Wed Nov 20 11:54:38 2013 +0000 + + dwz compressed alternate .debug_info and .debug_str not read correctly. + + Bug #327837. The buildid from the .gnu_debugaltlink section was parsed + incorrectly (from the wrong offset). Causing the debug alt file not to + be found. + + git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13715 a5019735-40e9-0310-863c-91ae7b9d1cf9 + +diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c +index e72e0d7..b7d574a 100644 +--- a/coregrind/m_debuginfo/readelf.c ++++ b/coregrind/m_debuginfo/readelf.c +@@ -2609,7 +2609,8 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) + vg_assert(aimg == NULL); + + if (debugaltlink_escn.img != NULL) { +- UInt buildid_offset = ML_(img_strlen)(debugaltlink_escn.img, 0)+1; ++ UInt buildid_offset = ML_(img_strlen)(debugaltlink_escn.img, ++ debugaltlink_escn.ioff)+1; + + vg_assert(buildid_offset < debugaltlink_escn.szB); + diff --git a/valgrind.spec b/valgrind.spec index 6f35ba0..f7c9ad3 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -32,6 +32,9 @@ Patch5: valgrind-3.9.0-gdbserver_tests-mcinvoke-ppc64.patch # KDE#326983 - insn_basic test might crash because of setting DF flag Patch6: valgrind-3.9.0-amd64_gen_insn_test.patch +# KDE#327837 - dwz compressed alternate .debug_info/str not read correctly. +Patch7: valgrind-3.9.0-dwz-alt-buildid.patch + %ifarch x86_64 ppc64 # 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 @@ -126,6 +129,7 @@ Valgrind User Manual for details. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -279,6 +283,9 @@ echo ===============END TESTING=============== %endif %changelog +* Wed Nov 20 2013 Mark Wielaard +- Add valgrind-3.9.0-dwz-alt-buildid.patch. + * Fri Nov 1 2013 Mark Wielaard - 3.9.0-1 - Upgrade to valgrind 3.9.0 final. - Remove support for really ancient GCCs (valgrind-3.9.0-config_h.patch).