[PATCH] D19656: [ELF] - keep alive all non-text sections referenced by .eh_frame

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 07:40:42 PDT 2016


grimar added a comment.

In http://reviews.llvm.org/D19656#415910, @compnerd wrote:

> This introduces a new crash on x86_64.  Ive not had a chance to reduce this to a test case that is easy to work with, but the following seems to demonstrate the issue:


Reproduced, looking at.


================
Comment at: ELF/MarkLive.cpp:190
@@ +189,3 @@
+  // sections that contain personality. We preserve all non-text sections
+  // reffered by .eh_frame here.
+  for (const std::unique_ptr<ObjectFile<ELFT>> &F : Symtab->getObjectFiles())
----------------
compnerd wrote:
> Nit: you misspelt referred.
Thanks !

================
Comment at: ELF/MarkLive.cpp:194
@@ +193,3 @@
+      if (auto *EH = dyn_cast_or_null<EHInputSection<ELFT>>(Sec))
+        scanEhFrameSection<ELFT>(*EH);
+
----------------
compnerd wrote:
> Is there a reason to not just merge this into the loops above?  It seems unnecessary to re-iterate the objects and sections within the objects.
I tried both ways when wrote that and finally decided to split eh_frame processing as special case just to emphasize its exceptional nature. Have no real preference here.


http://reviews.llvm.org/D19656





More information about the llvm-commits mailing list