]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR 33473 SEGV in _bfd_elf_gc_mark_debug_special_section_group
authorAlan Modra <amodra@gmail.com>
Mon, 24 Nov 2025 08:16:35 +0000 (18:46 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 24 Nov 2025 21:20:17 +0000 (07:50 +1030)
commit4e397ea9446b3dca3cbc85b6c0e0158042548f19
tree930f4d30926ec51aed8d33e9741f932374be7f48
parenta6feabfb8f9aa31107f162dbd47c4ec7201cf625
PR 33473 SEGV in _bfd_elf_gc_mark_debug_special_section_group

The code that faulted made the assumption that a group section always
had at least one valid member.  Fix that assumption.  Also fail if all
entries in a SHT_GROUP section are invalid.  (An empty group will not
result in a call to process_sht_group_entries.)

PR 33473
* elflink.x (_bfd_elf_gc_mark_debug_special_section_group): Don't
segfault on empty group.
* elf.c (process_sht_group_entries): Return false if all
entries are invalid.
bfd/elf.c
bfd/elflink.c