Module: wine Branch: master Commit: 30c8da1c9dd8dcc1aee2d328a5fdf7edbf6c7978 URL: https://gitlab.winehq.org/wine/wine/-/commit/30c8da1c9dd8dcc1aee2d328a5fdf7e...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Oct 3 14:13:56 2023 +0200
ntdll: Do an explicit mmap address search for any range not covering the entire address space.
---
dlls/ntdll/unix/virtual.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index f027c0e4b85..6ed44431c9b 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -1361,7 +1361,7 @@ static void *map_free_area( void *base, void *end, size_t size, int top_down, in start = try_map_free_area( base, end, step, start, size, unix_prot );
if (!start) - ERR( "couldn't map free area in range %p-%p, size %p", base, end, (void *)size ); + ERR( "couldn't map free area in range %p-%p, size %p\n", base, end, (void *)size );
return start; } @@ -2031,7 +2031,7 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size, goto done; }
- if (limit_low || limit_high) + if (start > address_space_start || end < address_space_limit || top_down) { if (!(ptr = map_free_area( start, end, size, top_down, get_unix_prot(vprot), align_mask ))) return STATUS_NO_MEMORY;