[all-commits] [llvm/llvm-project] ca0560: [DebugInfo] Don't error for zero-length arange ent...

James Henderson via All-commits all-commits at lists.llvm.org
Mon Aug 10 06:58:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ca05601cd2a1b75050538ef2e78de205f1300692
      https://github.com/llvm/llvm-project/commit/ca05601cd2a1b75050538ef2e78de205f1300692
  Author: James Henderson <james.henderson at sony.com>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
    M llvm/test/tools/obj2yaml/ELF/DWARF/debug-aranges.yaml
    M llvm/tools/obj2yaml/dwarf2yaml.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp

  Log Message:
  -----------
  [DebugInfo] Don't error for zero-length arange entries

Although the DWARF specification states that .debug_aranges entries
can't have length zero, these can occur in the wild. There's no
particular reason to enforce this part of the spec, since functionally
they have no impact. The patch removes the error and introduces a new
warning for premature terminator entries which does not stop parsing.

This is a relanding of cb3a598c87db, adding the missing obj2yaml part
that was needed.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46805. See also
https://reviews.llvm.org/D71932 which originally introduced the error.

Reviewed by: ikudrin, dblaikie, Higuoxing

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




More information about the All-commits mailing list