[Lldb-commits] [lldb] [lldb] Tighten ABI assert in `StopInfoMachException::DeterminePtrauthFailure` (NFC) (PR #95015)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 11 16:56:26 PDT 2024


================
@@ -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");
----------------
jasonmolenda wrote:

tbh I'm not entirely sure why we're here at all for an x86_64 target? this method is only be called when the target cpu is llvm::Triple::aarch64.  It fetches the value of the x16 register just before this, and returns if no such register is found I think?  But yes, I would change these to not get the ABI and instead call Process::FixCodeAddress instead of getting the ABI at all, and asserting if we could not.  Process::FixCodeAddress will silently return the same value if there is no ABI (and if it gets an ABI without a FixCodeAddress override method, it will also return the same value).

https://github.com/llvm/llvm-project/pull/95015


More information about the lldb-commits mailing list