This patch replaces .handleAppleNames() with .handleAccelTables().
This way, any accelerator tables will be verified (if it exists).
Details
Diff Detail
- Build Status
Buildable 8583 Build 8583: arc lint + arc unit
Event Timeline
| include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
|---|---|---|
| 52 | I'm not sure this needs to be part of the interface — and if it is this should be a static constant or a constexpr instead of a data member. | |
| include/llvm/DebugInfo/DWARF/DWARFVerifier.h | ||
| 175 | ... existing *Apple-style* accelerator tables ... | |
| lib/DebugInfo/DWARF/DWARFContext.cpp | ||
| 430 | Could you just update all of the other cases in a separate commit? | |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
| 478 | "Section" << Sectionname << " is too small to fit a section header\n" | |
| 482 | why initialize to 8? | |
| 484 | "Section" << Sectionname << " is smaller than size described in section header\n" | |
| 569 | if (!D.getAppleNamesSection().Data.empty()) | |
| 572 | ... | |
| 583 | add one :-) | |
Addressed reviewer's comments.
| include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
|---|---|---|
| 52 | Removed it. I can use getSizeHdr() instead. | |
| lib/DebugInfo/DWARF/DWARFContext.cpp | ||
| 430 | Yes, I'll do that. | |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
| 482 | I thought I need to verify whether num_of_buckets > 0 (and that field would be at offset 8 from the beginning of the section). I modified the code to perform only extract() for the second check. | |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
|---|---|---|
| 566 | One last thing: You should not need to hard-code the name here. Can you extract it from the Section datastructure instead? | |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
|---|---|---|
| 566 | I'm not sure how to do this. Even dumpAccelSection() in DWARFContext.cpp is being called with the name of the section as an argument. | |
I'm not sure this needs to be part of the interface — and if it is this should be a static constant or a constexpr instead of a data member.