[all-commits] [llvm/llvm-project] 82f2b6: [llvm-objdump][ELF]Fix crash when reading strings ...

Ruoyu Qiu via All-commits all-commits at lists.llvm.org
Sun Mar 9 19:40:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82f2b661101d1133b72872141009035f01a42595
      https://github.com/llvm/llvm-project/commit/82f2b661101d1133b72872141009035f01a42595
  Author: Ruoyu Qiu <cabbaken at outlook.com>
  Date:   2025-03-09 (Sun, 09 Mar 2025)

  Changed paths:
    M llvm/test/tools/llvm-objdump/ELF/dynamic-section.test
    M llvm/tools/llvm-objdump/ELFDump.cpp

  Log Message:
  -----------
  [llvm-objdump][ELF]Fix crash when reading strings from .dynstr (#125679)

This change introduces a check for the strtab offset to prevent
llvm-objdump from crashing when processing malformed ELF files.
It provide a minimal reproduce test for
https://github.com/llvm/llvm-project/issues/86612#issuecomment-2035694455.
Additionally, it modifies how llvm-objdump handles and outputs malformed
ELF files with invalid string offsets.(More info:
https://discourse.llvm.org/t/should-llvm-objdump-objdump-display-actual-corrupted-values-in-malformed-elf-files/84391)

Fixes: #86612

Co-authored-by: James Henderson <James.Henderson at sony.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list