[PATCH] D95809: [lld-macho] Emit personalities in compact unwind
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 12:30:13 PST 2021
int3 added a subscriber: gkm.
int3 added inline comments.
================
Comment at: lld/MachO/UnwindInfoSection.cpp:108
+// XXX: This assumes that all the sections containing function addresses have
+// already been finalized. Not sure this is valid assumption.
+static void relocateCompactUnwind(MergedOutputSection *compactUnwindSection,
----------------
clayborg wrote:
> Is there an assert or check you can put into the code to verify this assumption?
I suppose we could be conservative and assert that the relocations only point within the `__TEXT` segment...
Note that problem already exists in the current implementation (which @gkm wrote) -- it calls `compactUnwindSection->writeTo()` instead of `relocateCompactUnwind()`, but `writeTo()` makes the same assumptions. Not sure if @gkm has thoughts on this.
================
Comment at: lld/MachO/UnwindInfoSection.cpp:201
cuPtrVector.reserve(cuCount);
- for (const CompactUnwindEntry64 &cuEntry : cuVector)
+ for (CompactUnwindEntry64 &cuEntry : cuVector)
cuPtrVector.emplace_back(&cuEntry);
----------------
clayborg wrote:
> We don't seem to modify the "cuEntry" in the loop below, can be put the "const" back and revert this change?
oops yeah leftover change
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95809/new/
https://reviews.llvm.org/D95809
More information about the llvm-commits
mailing list