diff --git a/src/AddressSpace.cc b/src/AddressSpace.cc index 7c73b07f629..54d60ef1376 100644 --- a/src/AddressSpace.cc +++ b/src/AddressSpace.cc @@ -2341,7 +2341,9 @@ remote_ptr AddressSpace::chaos_mode_find_free_memory(RecordTask* t, MemoryRange global_exclusion_range = get_global_exclusion_range(&t->session()); // NB: Above RR_PAGE_ADDR is probably not free anyways, but if it somehow is // don't hand it out again. - static MemoryRange rrpage_so_range = MemoryRange(RR_PAGE_ADDR - PRELOAD_LIBRARY_PAGE_SIZE, RR_PAGE_ADDR + PRELOAD_LIBRARY_PAGE_SIZE); + static MemoryRange rrpage_so_range = MemoryRange(remote_ptr(RR_PAGE_ADDR - PRELOAD_LIBRARY_PAGE_SIZE), + remote_ptr(RR_PAGE_ADDR + PRELOAD_LIBRARY_PAGE_SIZE)); + assert(rrpage_so_range.size() == 2 * PRELOAD_LIBRARY_PAGE_SIZE); // Ignore the hint half the time. if (hint && (random() & 1)) {