ntdll: Don't clear the last page of the initial stack.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a003f0aed8
commit
9979c793e8
|
@ -3152,7 +3152,7 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
|
||||||
if ((status = fixup_imports( wm, load_path )) != STATUS_SUCCESS) goto error;
|
if ((status = fixup_imports( wm, load_path )) != STATUS_SUCCESS) goto error;
|
||||||
heap_set_debug_flags( GetProcessHeap() );
|
heap_set_debug_flags( GetProcessHeap() );
|
||||||
|
|
||||||
status = wine_call_on_stack( attach_process_dlls, wm, NtCurrentTeb()->Tib.StackBase );
|
status = wine_call_on_stack( attach_process_dlls, wm, (char *)NtCurrentTeb()->Tib.StackBase - page_size );
|
||||||
if (status != STATUS_SUCCESS) goto error;
|
if (status != STATUS_SUCCESS) goto error;
|
||||||
|
|
||||||
virtual_release_address_space();
|
virtual_release_address_space();
|
||||||
|
|
|
@ -1745,8 +1745,8 @@ void virtual_clear_thread_stack(void)
|
||||||
void *stack = NtCurrentTeb()->Tib.StackLimit;
|
void *stack = NtCurrentTeb()->Tib.StackLimit;
|
||||||
size_t size = (char *)NtCurrentTeb()->Tib.StackBase - (char *)NtCurrentTeb()->Tib.StackLimit;
|
size_t size = (char *)NtCurrentTeb()->Tib.StackBase - (char *)NtCurrentTeb()->Tib.StackLimit;
|
||||||
|
|
||||||
wine_anon_mmap( stack, size, PROT_READ | PROT_WRITE, MAP_FIXED );
|
wine_anon_mmap( stack, size - page_size, PROT_READ | PROT_WRITE, MAP_FIXED );
|
||||||
if (force_exec_prot) mprotect( stack, size, PROT_READ | PROT_WRITE | PROT_EXEC );
|
if (force_exec_prot) mprotect( stack, size - page_size, PROT_READ | PROT_WRITE | PROT_EXEC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue