[PATCH] D79962: Fix the verification of DIEs with DW_AT_ranges.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 05:57:24 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:420
+      // more dead stripped address ranges which tend to all be at the same
+      // address: 0 or -1.
+      if (auto PrevRange = RI.insert(Range)) {
----------------
clayborg wrote:
> My next patch will be to calculate all of the read + execute section ranges and verify all addresses against this. If the address ranges aren't in the read+execute ranges, then ignore the address (on fully linked input files only, not .o files). This will help clear out incorrect errors that find overlapping address ranges. That should be enough.
By the way, LLD is about to start patching -1/-2 for .debug data addresses to indicate "ignore me". See D81784.


================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_cu_ranges.yaml:67
+
+# CHECK-NOT: error: DIE address ranges are not contained in its parent's ranges:
+# CHECK: Verifying .debug_info references...
----------------
clayborg wrote:
> clayborg wrote:
> > jhenderson wrote:
> > > Maybe it would be better to add `--implicit-check-not=error:` to FileCheck's invocation. That way, all errors will be detected, regardless of position, and will avoid this check passing spuriously in the future should the text of the message ever change.
> > that is a good idea. I haven't used that flag before.
> Actually can't include this because there is an error before this on line 44
--implicit-check-not only fails if the string is found and it wasn't matched by an explicit check somewhere else. Consequently, the line 44 check will mean --implicit-check-not should still work. It will only not work if there are other errors for this test case which aren't being checked for.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79962





More information about the llvm-commits mailing list