Currently when the .eh_frame section is truncated so that
CFI instructions can't be read, it is possible to enter
an infinite loop.
It happens because CFIProgram::parse does not handle errors properly.
This patch fixes the issue.
Paths
| Differential D82017
[DebugInfo/DWARF] - Do not hang when CFI are truncated. ClosedPublic Authored by grimar on Jun 17 2020, 7:55 AM.
Details Summary Currently when the .eh_frame section is truncated so that It happens because CFIProgram::parse does not handle errors properly.
Diff Detail Event Timelinegrimar retitled this revision from [DebugInfo/DWARF] - Do not hang when the CFI is truncated. to [DebugInfo/DWARF] - Do not hang when CFI are truncated..Jun 17 2020, 7:56 AM
grimar marked 5 inline comments as done. Comment Actions
Comment Actions LGTM, thanks.
This revision is now accepted and ready to land.Jun 23 2020, 12:50 AM Closed by commit rG1e820e82b143: [DebugInfo/DWARF] - Do not hang when CFI are truncated. (authored by grimar). · Explain WhyJun 23 2020, 5:17 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 271989 llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
|
clang-format may prefer /*SectionIndex=*/nullptr