[PATCH] D39185: [llvm-dwarfdump] - Fix array out of bounds access crash.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 09:25:00 PDT 2017
aprantl added inline comments.
================
Comment at: include/llvm/DebugInfo/DWARF/DWARFDie.h:45
DWARFUnit *U = nullptr;
- const DWARFDebugInfoEntry *Die = nullptr;
+ ArrayRef<DWARFDebugInfoEntry> Die;
----------------
Can you add a comment explaining why the Die member is an array and what the bounds of the array are representing? I assume that the last member of the array is the last children of the DIE?
================
Comment at: tools/llvm-dwarfdump/llvm-dwarfdump.cpp:284
+ for (const auto &CU : CUs) {
+ for (unsigned I = 0, E = CU->getNumDIEs(); I != E; ++I) {
+ DWARFDie Die = CU->getDIEAtIndex(I);
----------------
why does this break the iterator?
https://reviews.llvm.org/D39185
More information about the llvm-commits
mailing list