From 3ce2dbea6ba58768506165ec86b9658f28a13f70 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 17 Feb 2022 00:06:15 +0100 Subject: mach_vm_object_pages: Print a warning if the physical address is beyond 4GiB vpi_offset is not currently large enough to store it. --- vm/vm_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vm/vm_debug.c b/vm/vm_debug.c index 43221cff..2dff2296 100644 --- a/vm/vm_debug.c +++ b/vm/vm_debug.c @@ -321,6 +321,8 @@ mach_vm_object_pages( vm_page_info_state_t state = 0; info->vpi_offset = p->offset; + if (p->phys_addr != (typeof(info->vpi_phys_addr)) p->phys_addr) + printf("warning: physical address overflow in mach_vm_object_pages!!"); info->vpi_phys_addr = p->phys_addr; info->vpi_wire_count = p->wire_count; info->vpi_page_lock = p->page_lock; -- cgit v1.2.3