[PATCH 0/1] MR6299: ntdll: Determine the available address space dynamically on all architectures
Resolves issue https://gitlab.winehq.org/wine/wine/-/merge_requests/3598#note_75871 The host address space limit may not be `0x7fffffff0000` on any architecture (eg: ARM64). Such architectures can fully emulate x86_64 Wine (eg: QEMU, FEX, BOX64) and need to have their host address space detected. Implementing the detection regardless of the Wine build architecture should not regress anything. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6299
From: theofficialgman <3676-theofficialgman(a)users.noreply.gitlab.winehq.org> --- dlls/ntdll/unix/virtual.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 0fedfe0fb1d..5f8bab77cc5 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2436,8 +2436,6 @@ static NTSTATUS map_pe_header( void *ptr, size_t size, int fd, BOOL *removable ) return STATUS_SUCCESS; /* page protections will be updated later */ } -#ifdef __aarch64__ - /*********************************************************************** * get_host_addr_space_limit */ @@ -2464,6 +2462,7 @@ static void *get_host_addr_space_limit(void) return (void *)((addr << 1) - (granularity_mask + 1)); } +#ifdef __aarch64__ /*********************************************************************** * alloc_arm64ec_map @@ -3296,12 +3295,8 @@ void virtual_init(void) pthread_mutex_init( &virtual_mutex, &attr ); pthread_mutexattr_destroy( &attr ); -#ifdef __aarch64__ host_addr_space_limit = get_host_addr_space_limit(); TRACE( "host addr space limit: %p\n", host_addr_space_limit ); -#else - host_addr_space_limit = address_space_limit; -#endif if (preload_info && *preload_info) for (i = 0; (*preload_info)[i].size; i++) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6299
WineHQ contribution guidelines require the use of real name for contributions (even if the change is completely unrelated to reverse-engineering) Also I have a nit for the missing dot at the end of commit message (Julliard will add one when merging this MR but it's nice to add it anyway) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6299#note_78961
participants (3)
-
Aida Jonikienė -
theofficialgman -
theofficialgman (@theofficialgman)