[Lldb-commits] [lldb] [lldb] Handle an empty SBMemoryRegionInfo from scripted process (PR #115963)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 12 17:42:22 PST 2024
================
@@ -288,8 +288,15 @@ Status ScriptedProcess::DoGetMemoryRegionInfo(lldb::addr_t load_addr,
MemoryRegionInfo ®ion) {
Status error;
if (auto region_or_err =
- GetInterface().GetMemoryRegionContainingAddress(load_addr, error))
+ GetInterface().GetMemoryRegionContainingAddress(load_addr, error)) {
region = *region_or_err;
+ if (region.GetRange().GetRangeBase() == 0 &&
+ (region.GetRange().GetByteSize() == 0 ||
+ region.GetRange().GetByteSize() == LLDB_INVALID_ADDRESS)) {
----------------
jasonmolenda wrote:
Last week I had another similar bug where a gdb remote stub was returning start addr 0 size UINT64_MAX as a region response, and I was trying to reject that in addition to addr 0 size 0. I haven't seen someone send that same incorrect response from a scripted process, though, I should just check for 0/0 here.
https://github.com/llvm/llvm-project/pull/115963
More information about the lldb-commits
mailing list