[PATCH] D85313: [DebugInfo] Don't error for zero-length arange entries

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 02:14:50 PDT 2020


jhenderson added a comment.

In D85313#2196990 <https://reviews.llvm.org/D85313#2196990>, @dblaikie wrote:

> Any chance/worth a warning/non-fatal error?

I'd prefer not to - as noted elsewhere, our downstream solution for gc'ed references from .debug_aranges was to patch (-1, 0) for the .debug_aranges, so we have plenty of older objects with length 0 entries. At some point in the future these will start disappearing, now that we've moved to the new LLD tombstoning behaviour, but it would be nice to have a grace period, if that's okay?



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp:138-142
     if (arangeDescriptor.Length == 0) {
       // Each set of tuples is terminated by a 0 for the address and 0
       // for the length.
       if (arangeDescriptor.Address == 0 && *offset_ptr == end_offset)
         return ErrorSuccess();
----------------
ikudrin wrote:
>   - Thought 1: these two `if`s can now be combined into one.
>   - Thought 2: should not we report the premature termination of the list?
Yeah, I wasn't sure about premature list termination. I think I'll add a warning/non-fatal error of some kind, and keep dumping - the header's length field means we know that it should be possible to ignore the terminator and continue dumping.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85313/new/

https://reviews.llvm.org/D85313



More information about the llvm-commits mailing list