[all-commits] [llvm/llvm-project] 5e74b2: llvm-dwarfdump --verify: Add support for .debug_st...

David Blaikie via All-commits all-commits at lists.llvm.org
Mon Jun 5 12:59:53 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e74b2e8bb9b191aa5ed433820860b30ca7d9baa
      https://github.com/llvm/llvm-project/commit/5e74b2e8bb9b191aa5ed433820860b30ca7d9baa
  Author: David Blaikie <dblaikie at gmail.com>
  Date:   2023-06-05 (Mon, 05 Jun 2023)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    M llvm/test/tools/llvm-dwarfdump/X86/verify_dwarf5_debug_line.yaml
    A llvm/test/tools/llvm-dwarfdump/X86/verify_invalid_str_offsets.yaml

  Log Message:
  -----------
  llvm-dwarfdump --verify: Add support for .debug_str_offsets[.dwo]

Had a couple of issues lately causing corrupted strings due to
problematic str_offsets (overflow due to >4GB .debug_str.dwo section in
a dwp and the dwp tool silently overflowing the 32 bit offsets updated
in the .debug_str_offsets.dwo section, and then more recently two CUs in
a dwo caused the dwp tool to reapply the offset adjustment twice
corrupting str_offsets.dwo as well) - so let's check that the offsets
are valid.

This assumes no suffix merging - if anyone implements that, then this
checking should just be removed for the most part (we could still check
the offsets are within the bounds of .debug_str[.dwo], but nothing more
- any offset in the range would be valid, the offsets wouldn't have to
land at the start of a string)




More information about the All-commits mailing list