================ @@ -6184,7 +6184,14 @@ Status Process::GetMemoryRegionInfo(lldb::addr_t load_addr, MemoryRegionInfo &range_info) { if (const lldb::ABISP &abi = GetABI()) load_addr = abi->FixAnyAddress(load_addr); - return DoGetMemoryRegionInfo(load_addr, range_info); + Status error = DoGetMemoryRegionInfo(load_addr, range_info); + // Reject a region that does not contain the requested address. + if (error.Success() && (range_info.GetRange().GetRangeBase() < load_addr || + range_info.GetRange().GetRangeEnd() <= load_addr)) ---------------- medismailben wrote:
I believe in `range_info.GetRange().GetRangeBase() < load_addr` the sign should be inverted. You could use directly the `Range::{Contains, ContainsEndInclusive}` instead ? ```suggestion if (error.Success() && !range_info.GetRange().ContainsEndInclusive(load_addr)) ``` https://github.com/llvm/llvm-project/pull/115963 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits