ntdll: Do not force 2G stack limit for the main thread of 64 bit process.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b3d25fbe3c
commit
3033e09070
|
@ -2169,7 +2169,7 @@ static void start_main_thread(void)
|
|||
if (p___wine_main_wargv) *p___wine_main_wargv = main_wargv;
|
||||
*(ULONG_PTR *)&peb->CloudFileFlags = get_image_address();
|
||||
set_load_order_app_name( main_wargv[0] );
|
||||
init_thread_stack( teb, is_win64 ? 0x7fffffff : 0, 0, 0 );
|
||||
init_thread_stack( teb, 0, 0, 0 );
|
||||
NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
load_ntdll();
|
||||
if (main_image_info.Machine != current_machine) load_wow64_ntdll( main_image_info.Machine );
|
||||
|
|
|
@ -1156,7 +1156,8 @@ NTSTATUS init_thread_stack( TEB *teb, ULONG_PTR zero_bits, SIZE_T reserve_size,
|
|||
|
||||
#ifdef _WIN64
|
||||
/* 32-bit stack */
|
||||
if ((status = virtual_alloc_thread_stack( &stack, zero_bits, reserve_size, commit_size, 0 )))
|
||||
if ((status = virtual_alloc_thread_stack( &stack, zero_bits ? zero_bits : 0x7fffffff,
|
||||
reserve_size, commit_size, 0 )))
|
||||
return status;
|
||||
wow_teb->Tib.StackBase = PtrToUlong( stack.StackBase );
|
||||
wow_teb->Tib.StackLimit = PtrToUlong( stack.StackLimit );
|
||||
|
|
Loading…
Reference in New Issue