|
[Valgrind-developers] [valgrind] Don't look for debug alt file in
debug image if it is already found
From: Mark W. <ma...@so...> - 2021-03-09 15:53:24
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=8b1961511c93962ea2a9b918af8e9c32e3c24d71 commit 8b1961511c93962ea2a9b918af8e9c32e3c24d71 Author: Balint Reczey <bal...@ca...> Date: Thu Nov 28 13:34:21 2019 +0100 Don't look for debug alt file in debug image if it is already found 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 <bal...@ca...> Diff: --- NEWS | 2 ++ coregrind/m_debuginfo/readelf.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6679177b89..93fad51810 100644 --- 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 diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index 3f5f48c703..b0f062ddc6 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -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) |