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

Saleem Abdulrasool via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 16 07:46:57 PDT 2020


compnerd requested changes to this revision.
compnerd added a comment.
This revision now requires changes to proceed.

I think that tracking the segment length should be okay.  It’s a total overhead of 8 bytes, which is only allocated once,  however, the naming here is egregiously bad.  This is the segment length and not the DSO length nor the DSO mapped length (which may actually be larger or smaller based on the load segment layout).



================
Comment at: libunwind/src/AddressSpace.hpp:417
       cbdata->sects->dso_base = begin;
-      cbdata->sects->dwarf_section_length = phdr->p_memsz;
+      cbdata->sects->dso_length = phdr->p_memsz;
       return true;
----------------
This seems like a bad name.  This is the segment length, not the DSO length.  There can be multiple PT_LOAD segments.


================
Comment at: libunwind/test/frameheadercache_test.pass.cpp:19
 #define kBaseAddr 0xFFF000
-#define kDwarfSectionLength 0xFF
+#define kDsoLength 0xFF
 
----------------
This also shouldn’t be called DSO Length,


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87750/new/

https://reviews.llvm.org/D87750



More information about the libcxx-commits mailing list