================
@@ -640,6 +640,9 @@ void IRMemoryMap::WritePointerToMemory(lldb::addr_t 
process_address,
                                        lldb::addr_t address, Status &error) {
   error.Clear();
 
+  if (auto process_sp = GetProcessWP().lock())
+    address = process_sp->FixAnyAddress(address);
----------------
DavidSpickett wrote:

At least one thing in this method should be actually be called pointer, but 
that's not your fault.

I'm not 100% sure that all pointer values here do want to be fixed. Looking at 
the uses of this method inside of lldb I see:
* materialising references to variables
* setting up the stack frame for a function call, in some ABI plugins

Both of which should be ok with removing the current uses of non-address bits. 
If you remove pointer authentication bits from a function pointer, it should 
still authenticate, it's just unsigned. So if there was code that checked for 
that, that's a corner case that won't work.

It's not in the SB API so there's nothing to break there.

Probably some corner case here but short of a major rework of how we handle 
addresses, this is a good step. We can consider it a bug fix to the current 
strategy, whether that strategy is ultimately good or bad.

https://github.com/llvm/llvm-project/pull/152798
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to