================
@@ -313,6 +314,18 @@ bool CFI_Parser<A>::findFDE(A &addressSpace, pint_t pc,
pint_t ehSectionStart,
}
return false;
}
+namespace {
+// This helper function handles setting the manually signed personality on
+// CIE_Info without attempt to authenticate and/or re-sign
+template <typename CIE_Info, typename T>
+[[maybe_unused]] void set_cie_info_personality(CIE_Info *info,
+ T signed_personality) {
+ static_assert(sizeof(info->personality) == sizeof(signed_personality),
+ "Signed personality is the wrong size");
+ memmove((void *)&info->personality, (void *)&signed_personality,
----------------
kovdan01 wrote:
> Hmmm, other platforms haven't simply adopted the "handle overlap correctly
> everywhere" approach? :-/
@ojhunt I honestly can't say for all the platforms, but I suppose that `memcpy`
expresses the intention better than `memmove` here
https://github.com/llvm/llvm-project/pull/143230
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits