Brendan Shanks (@bshanks) commented about server/mach.c:
if (ret != KERN_SUCCESS)
goto out;
/*
* Actually check that everything is sane before suspending.
* KERN_INVALID_ADDRESS can also be returned when address is illegal or
* specifies a non-allocated region.
*/
if (region_address > current_address ||
region_address + region_size <= current_address)
{
ret = KERN_INVALID_ADDRESS;
goto out;
}
/*
extra space at the end of this line also