]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't look for debug alt file in debug image if it is already found
authorBalint Reczey <balint.reczey@canonical.com>
Thu, 28 Nov 2019 12:34:21 +0000 (13:34 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 9 Mar 2021 15:38:15 +0000 (16:38 +0100)
With dwz the .gnu_debuglink section may appear duplicated in the
debug file referenced originally in the .gnu_debuglink section.

https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/1848211

https://bugs.kde.org/show_bug.cgi?id=396656
https://bugs.kde.org/show_bug.cgi?id=427969

Signed-off-by: Balint Reczey <balint.reczey@canonical.com>
NEWS
coregrind/m_debuginfo/readelf.c

diff --git a/NEWS b/NEWS
index 6679177b89750ca975abf7e3f95b37ddd5547563..93fad5181057a0e3c5fd181e28c3ce3b7e9d1106 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -114,6 +114,7 @@ where XXXXXX is the bug number as listed below.
 384729  __libc_freeres inhibits cross-platform valgrind
 388787  Support for C++17 new/delete
 391853  Makefile.all.am:L247 and @SOLARIS_UNDEF_LARGESOURCE@ being empty
+396656  Warnings while reading debug info
 397605  ioctl FICLONE mishandled
 408663  Suppression file for musl libc
 404076  s390x: z14 vector instructions not implemented
@@ -140,6 +141,7 @@ where XXXXXX is the bug number as listed below.
 427404  PPC ISA 3.1 support is missing, part 6
 427870  lmw, lswi and related PowerPC insns aren't allowed on ppc64le
 427787  Support new faccessat2 linux syscall (439)
+427969  debuginfo section duplicates a section in the main ELF file
 428035  drd: Unbreak the musl build
 428648  s390_emit_load_mem panics due to 20-bit offset for vector load
 428716  cppcheck detects potential leak in VEX/useful/smchash.c
index 3f5f48c7033f3adfe4c05ceafa9ae83cd8bc9bce..b0f062ddc6b4b197a013c1892c20f8860bc6994b 100644 (file)
@@ -3170,7 +3170,8 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di )
             if (!ML_(sli_is_valid)(debug_frame_escn))
                FIND(need_dwarf2,     ".zdebug_frame",     debug_frame_escn)
 
-            FIND(   need_dwarf2,     ".gnu_debugaltlink", debugaltlink_escn)
+            if (!ML_(sli_is_valid)(debugaltlink_escn))
+               FIND(   need_dwarf2,     ".gnu_debugaltlink", debugaltlink_escn)
 
             FIND(   need_dwarf1,     ".debug",            dwarf1d_escn)
             FIND(   need_dwarf1,     ".line",             dwarf1l_escn)