[Lldb-commits] [lldb] [lldb] Call FixUpPointer in WritePointerToMemory (PR #152798)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 11 08:02:12 PDT 2025
================
@@ -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
More information about the lldb-commits
mailing list