commit 568d77ce8e0a508fbbd9e71e9938d6dab1639912
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
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);