[PATCH] D87750: [libunwind][DWARF] Fix end of .eh_frame calculation

Ryan Prichard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 02:04:58 PDT 2020


rprichard created this revision.
rprichard added reviewers: mstorsjo, compnerd, phosek.
Herald added projects: LLVM, libunwind.
Herald added subscribers: libcxx-commits, llvm-commits.
Herald added a reviewer: libunwind.
rprichard requested review of this revision.

- When .eh_frame is located using .eh_frame_hdr (PT_GNU_EH_FRAME), the location 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, dso_length, that the FrameHeaderCache uses to track to size of the PT_LOAD segment indicated by dso_base.
- Compute ehSectionEnd by adding sectionLength to ehSectionStart, never to fdeHint.

Fixes PR46829.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87750

Files:
  libunwind/src/AddressSpace.hpp
  libunwind/src/DwarfParser.hpp
  libunwind/src/FrameHeaderCache.hpp
  libunwind/src/UnwindCursor.hpp
  libunwind/test/frameheadercache_test.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87750.292148.patch
Type: text/x-patch
Size: 6532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200916/246f188e/attachment.bin>


More information about the llvm-commits mailing list