This patch replaces .handleAppleNames() with .handleAccelTables().
This way, any accelerator tables will be verified (if it exists).
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
| include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
|---|---|---|
| 52 ↗ | (On Diff #108148) | 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 ↗ | (On Diff #108148) | ... existing *Apple-style* accelerator tables ... |
| lib/DebugInfo/DWARF/DWARFContext.cpp | ||
| 430 ↗ | (On Diff #108148) | Could you just update all of the other cases in a separate commit? |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
| 478 ↗ | (On Diff #108148) | "Section" << Sectionname << " is too small to fit a section header\n" |
| 482 ↗ | (On Diff #108148) | why initialize to 8? |
| 484 ↗ | (On Diff #108148) | "Section" << Sectionname << " is smaller than size described in section header\n" |
| 569 ↗ | (On Diff #108148) | if (!D.getAppleNamesSection().Data.empty()) |
| 572 ↗ | (On Diff #108148) | ... |
| 583 ↗ | (On Diff #108148) | add one :-) |
Addressed reviewer's comments.
| include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
|---|---|---|
| 52 ↗ | (On Diff #108148) | Removed it. I can use getSizeHdr() instead. |
| lib/DebugInfo/DWARF/DWARFContext.cpp | ||
| 430 ↗ | (On Diff #108148) | Yes, I'll do that. |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
| 482 ↗ | (On Diff #108148) | 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. |
Two minor nitpicks, but otherwise LGTM, thanks!
| include/llvm/DebugInfo/DWARF/DWARFVerifier.h | ||
|---|---|---|
| 175 ↗ | (On Diff #108148) | Would you mind removing the *s again? I meant to use them as <insert new text here>-marker. Sorry :-) |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
| 483 ↗ | (On Diff #108179) | remove commented out line |
| lib/DebugInfo/DWARF/DWARFVerifier.cpp | ||
|---|---|---|
| 567 ↗ | (On Diff #108179) | 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 | ||
|---|---|---|
| 567 ↗ | (On Diff #108179) | 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. |