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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 03:34:33 PDT 2020


jhenderson added a comment.

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

> In D85313#2199447 <https://reviews.llvm.org/D85313#2199447>, @jhenderson wrote:
>
>> @dblaikie - are you happy with this version?
>
> Sounds good to me!

Thanks, I'll go ahead and push this then.

>> 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?
>
> Oh, interesting - didn't realize your linker specifically truncated the range to 0 length, that totally makes sense! But now you're adopting the "new tombstoning" Semantics of -1 for the address, but leaving the length value the same as came from the input object?

Yeah, we changed the length because not all our tools necessarily handled the tombstone value specifically, but a 0-length range would always be safe. We're transitioning to the new scheme however, to save us having to maintain things further.

> I personally have no particular use for the DWARF verifier - so I'm not in a position to make strong preferences for what should or shouldn't be verified. Hopefully as a warning it might be something relatively easy to patch out in your downstream builds (not ideal, I know :/), or filter out, etc.

We don't officially support using the verifier either (currently). This error/warning however is emitted by llvm-dwarfdump when printing the section, which is more problematic. I don't think we'd have an issue with it being added as a verifier warning of some sort consequently, but I'm not likely to add it myself, since it is not something that is useful for us. If we ever did add support for the verification, we'd likely say it only works with objects from a certain release onwards, or something similar.


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