[Lldb-commits] [lldb] [lldb] Use raw address in "memory history" command (PR #185812)

via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 10 23:18:00 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

<details>
<summary>Changes</summary>

The `memory history` command was using `ToAddress` for its  address argument, which strips non-addressable bits (including MTE tag bits) via `FixAnyAddress`. This caused us to pass a stripped address to `__asan_get_alloc_stack`/`__asan_get_free_stack`, which is incorrect. Switch to `ToRawAddress` to preserve the complete address, including the MTE tag, so we can look up the correct address.

---
Full diff: https://github.com/llvm/llvm-project/pull/185812.diff


1 Files Affected:

- (modified) lldb/source/Commands/CommandObjectMemory.cpp (+1-1) 


``````````diff
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 1ca98ac1a4bde..3b416028ee410 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -1567,7 +1567,7 @@ class CommandObjectMemoryHistory : public CommandObjectParsed {
     }
 
     Status error;
-    lldb::addr_t addr = OptionArgParser::ToAddress(
+    lldb::addr_t addr = OptionArgParser::ToRawAddress(
         &m_exe_ctx, command[0].ref(), LLDB_INVALID_ADDRESS, &error);
 
     if (addr == LLDB_INVALID_ADDRESS) {

``````````

</details>


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


More information about the lldb-commits mailing list