[PATCH] D124121: [DebugInfo] Give warning instead of error for premature terminator in .debug_aranges section.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 01:39:52 PDT 2022


jhenderson added a comment.

It's been a while since I looked at this code, so let me just confirm my understanding is correct:

1. You have a debug aranges table entry with address and size 0, but which corresponds to a real piece of data of size 0.
2. Such entries are treated as "warning" level problems, i.e. don't prevent continued parsing of the data within `DWARFDebugArangesSet`.
3. Prior to your change, "warning" level issues were reported via the same callback as "recoverable errors" within the `DWARFDebugAranges` code.
4. Your change changes the warning to be handled via a different callback, so that llvm-profdata can handle them differently.

All seems reasonable to me.

Re. testing, are there no existing ones that break with this change? If we need new tests, a lot of the DWARF code has gtest unit tests, including DWARFDebugArangesSet. I wonder if you could use those existing ones as a basis for testing these code chanegs?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124121



More information about the llvm-commits mailing list