[compiler-rt] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (#138571) (PR #143230)
Daniil Kovalev via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 18 02:05:46 PDT 2025
================
@@ -1877,6 +1946,32 @@ inline Registers_arm64::Registers_arm64(const void *registers) {
memcpy(_vectorHalfRegisters,
static_cast<const uint8_t *>(registers) + sizeof(GPRs),
sizeof(_vectorHalfRegisters));
+#if __has_feature(ptrauth_calls)
+ uint64_t pcRegister = 0;
+ memcpy(&pcRegister, ((uint8_t *)&_registers) + offsetof(GPRs, __pc),
+ sizeof(pcRegister));
+ setIP(pcRegister);
+ uint64_t fpRegister = 0;
+ memcpy(&fpRegister, ((uint8_t *)&_registers) + offsetof(GPRs, __fp),
+ sizeof(fpRegister));
+ setFP(fpRegister);
+#endif
+}
+
+inline Registers_arm64::Registers_arm64(const Registers_arm64 &other) {
----------------
kovdan01 wrote:
I've just revealed that at least `operator=` is not dead code. It's called from `stepWithDwarf`. So yeah, you probably just need to add declarations.
https://github.com/llvm/llvm-project/pull/143230
More information about the cfe-commits
mailing list