[PATCH] D80299: [DebugInfo] - Fix attempts of reading past the end of .eh_frame in DWARFDebugFrame::parse().
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 22 02:25:39 PDT 2020
grimar added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:381
+ // If the Length is 0, then this CIE is a terminator. We add it because some
+ // tools, like llvm-objdump might need it do print something special for
+ // such entries.
----------------
MaskRay wrote:
> aprantl wrote:
> > do -> to
> >
> > what is "something special"?
> Do you mean `readelf -wf`/`objdump -Wf` output `ZERO terminator`?
>
> This code here is correct. According to D46566: glibc unwind-dw2-fde.c classify_object_over_fdes has (I just checked, it still has) an oob problem if there is no ZERO terminator.
> what is "something special"?
> Do you mean readelf -wf/objdump -Wf output ZERO terminator?
Yeah. I've updated the comment to clarify.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:388
+ CIEs[StartOffset] = Cie.get();
+ Entries.emplace_back(std::move(Cie));
+ break;
----------------
MaskRay wrote:
> Minor nit: `push_back` (does not require a special constructor)
Right, thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80299/new/
https://reviews.llvm.org/D80299
More information about the llvm-commits
mailing list