[PATCH] D140227: [dsymutil] Verify the keep chain when asserts are enabled

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 10:10:51 PST 2022


JDevlieghere created this revision.
JDevlieghere added reviewers: avl, friss, aprantl.
Herald added a subscriber: hiraditya.
Herald added a project: All.
JDevlieghere requested review of this revision.
Herald added a project: LLVM.

Yesterday I was debugging another instance of the `Ref > InputDIE.getOffset()` assertion failing in dsymutil. Interestingly, the issue was totally unrelated to D138176 <https://reviews.llvm.org/D138176>. I narrowed down the issue to a DIE being marked as kept while its parent wasn't. That should never and is easy to diagnose. To verify my theory, I wrote a little verifier function. Given the complexity of the algorithm that looks for DIEs to keep, I think it's useful to keep it around and do the verification when asserts are enabled.


https://reviews.llvm.org/D140227

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/lib/DWARFLinker/DWARFLinkerCompileUnit.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140227.483575.patch
Type: text/x-patch
Size: 4330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221216/14f16f5c/attachment.bin>


More information about the llvm-commits mailing list