[Lldb-commits] [lldb] [lldb] Skip memory region probing in FindSpace when process can't JIT (PR #193124)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 24 08:52:50 PDT 2026
JDevlieghere wrote:
@jasonmolenda points out that this is wrong:
> The problem is that we grab a range of inferior virtual address space and designate it to be in IRMemoryMap's host memory, when we can't allocate memory in the inferior target. Expressions running through the IR Interpreter are working entirely in terms of inferior virtual addresses -- and IRMemoryMap remaps those addresses in its host-memory range to read from lldb's host memory, instead of the inferior memory.
>
> The danger is if IRMemoryMap puts the host memory virtual address range overlapping with an actaully-in-use address range in the inferior. That's why it was stepping through the memory ranges in the inferior process, it's trying to find a bit of address space that is (at least currently) unallocated, so it can map its host memory buffers there. The chances that the IRMemoryMap host memory VM range will overlap with actual inferior pointers is basically none for 64-bit targets. But with 32-bit targets, we're just hoping for the best.
https://github.com/llvm/llvm-project/pull/193124
More information about the lldb-commits
mailing list