[all-commits] [llvm/llvm-project] e1de85: Add verification for DW_AT_decl_file and DW_AT_cal...

Greg Clayton via All-commits all-commits at lists.llvm.org
Wed Aug 5 15:30:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e1de85f9f4dae68b2c83d8821515c1f5db765baa
      https://github.com/llvm/llvm-project/commit/e1de85f9f4dae68b2c83d8821515c1f5db765baa
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    A llvm/test/tools/llvm-dwarfdump/X86/verify_attr_file_indexes.yaml
    A llvm/test/tools/llvm-dwarfdump/X86/verify_attr_file_indexes_no_files.yaml
    M llvm/test/tools/llvm-dwarfdump/X86/verify_debug_info.s
    A llvm/test/tools/llvm-dwarfdump/X86/verify_file_encoding.yaml

  Log Message:
  -----------
  Add verification for DW_AT_decl_file and DW_AT_call_file.

LTO builds have been creating invalid DWARF and one of the errors was a file index that was out of bounds. "llvm-dwarfdump --verify" will check all file indexes for line tables already, but there are no checks for the validity of file indexes in attributes.

The verification will verify if there is a DW_AT_decl_file/DW_AT_call_file that:
- there is a line table for the compile unit
- the file index is valid
- the encoding is appropriate

Tests are added that test all of the above conditions.

Differential Revision: https://reviews.llvm.org/D84817




More information about the All-commits mailing list