HomePhabricator

[libunwind][DWARF] Fix end of .eh_frame calculation

Authored by rprichard on Wed, Sep 16, 1:22 AM.

Description

[libunwind][DWARF] Fix end of .eh_frame calculation

  • When .eh_frame is located using .eh_frame_hdr (PT_GNU_EH_FRAME), the start of .eh_frame is known, but not the size. In this case, the unwinder must rely on a terminator present at the end of .eh_frame. Set dwarf_section_length to UINTPTR_MAX to indicate this.
  • Add a new field, text_segment_length, that the FrameHeaderCache uses to track the size of the PT_LOAD segment indicated by dso_base.
  • Compute ehSectionEnd by adding sectionLength to ehSectionStart, never to fdeHint.

Fixes PR46829.

Differential Revision: https://reviews.llvm.org/D87750

Details

Committed
rprichardWed, Sep 16, 7:00 PM
Differential Revision
D87750: [libunwind][DWARF] Fix end of .eh_frame calculation
Parents
rG436a43afb2cf: [gn build] Port b04c1a9d312
Branches
Unknown
Tags
Unknown