[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Thu May 1 13:36:01 PDT 2025
================
@@ -212,6 +212,11 @@ __libunwind_seh_personality(int version, _Unwind_Action state,
ms_exc.ExceptionInformation[2] = state;
DISPATCHER_CONTEXT *disp_ctx =
__unw_seh_get_disp_ctx((unw_cursor_t *)context);
+#if defined(__aarch64__)
+ disp_ctx->NonVolatileRegisters = (PBYTE)&disp_ctx->ContextRecord->X19;
----------------
mstorsjo wrote:
Thanks for the insight!
So what's the right course of action here? I'm a little lost in the overall picture here. Should we allocate an `DISPATCHER_CONTEXT_NONVOLREG_ARM64` on the stack and populate it with the registers from `disp_ctx` here, before invoking `LanguageHandler`?
https://github.com/llvm/llvm-project/pull/137951
More information about the cfe-commits
mailing list