https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/95015
This patch tightens the assert check for the ABISP object in `StopInfoMachException::DeterminePtrauthFailure`. This causes some failure when debugging on a system that doesn't have pointer authentification support, like on Intel for instance. rdar://129401926 >From 3036bf2704bfa373c57df5f62a57d2296aedc01e Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani <ism...@bennani.ma> Date: Mon, 10 Jun 2024 10:42:10 -0700 Subject: [PATCH] [lldb] Tighten ABI assert in StopInfoMachException::DeterminePtrauthFailure (NFC) This patch tightens the assert check for the ABISP object in `StopInfoMachException::DeterminePtrauthFailure`. This causes some failure when debugging on a system that doesn't have pointer authentification support, like on Intel for instance. rdar://129401926 Signed-off-by: Med Ismail Bennani <ism...@bennani.ma> --- .../source/Plugins/Process/Utility/StopInfoMachException.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp index 75504323b4fdf..25cee369d7ee3 100644 --- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp +++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp @@ -92,9 +92,7 @@ bool StopInfoMachException::DeterminePtrauthFailure(ExecutionContext &exe_ctx) { Target &target = *exe_ctx.GetTargetPtr(); Process &process = *exe_ctx.GetProcessPtr(); - ABISP abi_sp = process.GetABI(); const ArchSpec &arch = target.GetArchitecture(); - assert(abi_sp && "Missing ABI info"); // Check for a ptrauth-enabled target. const bool ptrauth_enabled_target = @@ -110,6 +108,9 @@ bool StopInfoMachException::DeterminePtrauthFailure(ExecutionContext &exe_ctx) { strm.Printf("Note: Possible pointer authentication failure detected.\n"); }; + ABISP abi_sp = process.GetABI(); + assert(abi_sp && "Missing ABI info"); + // Check if we have a "brk 0xc47x" trap, where the value that failed to // authenticate is in x16. Address current_address = current_frame->GetFrameCodeAddress(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits