[Lldb-commits] [lldb] [lldb] Tighten ABI assert in `StopInfoMachException::DeterminePtrauthFailure` (NFC) (PR #95015)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 10 10:44:40 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Med Ismail Bennani (medismailben)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/95015.diff
1 Files Affected:
- (modified) lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp (+3-2)
``````````diff
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();
``````````
</details>
https://github.com/llvm/llvm-project/pull/95015
More information about the lldb-commits
mailing list