[PATCH] D155666: Do not emit a .debug_addr section if the DW_AT_addr_base is not set.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 09:29:07 PDT 2023


JDevlieghere added a comment.

The purpose of the verifier in dsymutil is twofold:

1. Catching invalid input DWARF.
2. Making sure we don't turn valid input DWARF into invalid output DWARF.

Testing the former is easy, but without any known bugs in dsymutil, testing the latter is tricky. So instead of crafting something that trips up dsymutil, the test for the verifier feeds invalid DWARF into dsymutil, relies on the fact that dsymutil doesn't know how to fix it, and as a result emits invalid DWARF, which the verifier then catches. If I understand correctly, the existing verify test is relying on something dsymutil wasn't able to fix up, but after @rastogishubham's patch, dsymutil is now smart enough to fix it, so the test fails. I think the solution here is to pick a different way to make the input DWARF invalid that dsymutil isn't able to fix.


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

https://reviews.llvm.org/D155666



More information about the llvm-commits mailing list