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

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 11:54:03 PDT 2020


clayborg marked 4 inline comments as done.
clayborg added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h:58
+  /// ranges were combined.
+  bool union_if_intersecting(const DWARFAddressRange &RHS) {
+    if (!intersects(RHS))
----------------
yep, I will change it


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:40
+      return Range;
+    }
+  }
----------------
True. I will do rename to "union" since we already know it intersects.


================
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)) {
----------------
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.


================
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...
----------------
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.


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