================
@@ -2697,7 +2701,11 @@ addr_t Process::AllocateMemory(size_t size, uint32_t
permissions,
return LLDB_INVALID_ADDRESS;
}
- return m_allocated_memory_cache.AllocateMemory(size, permissions, error);
+ addr_t alloced_addr =
+ m_allocated_memory_cache.AllocateMemory(size, permissions, error);
+ m_memory_region_infos_cache.Erase(alloced_addr, size);
----------------
JDevlieghere wrote:
If `AllocateMemory` return an `LLDB_INVALID_ADDRESS`, calling Erase will
overflow. Let's guard for that in Erase.
https://github.com/llvm/llvm-project/pull/206208
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits