[llvm] [DebugInfo][DWARF] Bounds-check the unit-index parallel table (PR #213285)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 06:09:59 PDT 2026


https://github.com/DavidSpickett commented:

Just from the surrounding code, the new check makes sense. I'm not familiar with this part of DWARF as a whole though.

For the test, I see some existing tests are using YAML inputs and some are using raw bytes. I'm guessing that the YAML is too high level to make what you want here, and doing it with raw bytes would have a bunch of 0s everywhere. So you added the convenience functions instead.

Is there a reference for the structure of this debug_cu_index? I see an example of one in https://dwarfstd.org/doc/DWARF5.pdf but I'm not sure how to go from that to the size of each field.

https://github.com/llvm/llvm-project/pull/213285


More information about the llvm-commits mailing list