ntdll: Clear the process stack again after dll init and before calling the main entry point.
This commit is contained in:
parent
7a7ef6a64c
commit
9b49cc2899
|
@ -2423,6 +2423,11 @@ void WINAPI LdrInitializeThunk( ULONG unknown1, ULONG unknown2, ULONG unknown3,
|
||||||
status = wine_call_on_stack( attach_process_dlls, wm, NtCurrentTeb()->Tib.StackBase );
|
status = wine_call_on_stack( attach_process_dlls, wm, NtCurrentTeb()->Tib.StackBase );
|
||||||
if (status != STATUS_SUCCESS) goto error;
|
if (status != STATUS_SUCCESS) goto error;
|
||||||
|
|
||||||
|
/* clear the stack contents before calling the main entry point, some broken apps need that */
|
||||||
|
wine_anon_mmap( NtCurrentTeb()->Tib.StackLimit,
|
||||||
|
(char *)NtCurrentTeb()->Tib.StackBase - (char *)NtCurrentTeb()->Tib.StackLimit,
|
||||||
|
PROT_READ | PROT_WRITE, MAP_FIXED );
|
||||||
|
|
||||||
if (nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE) VIRTUAL_UseLargeAddressSpace();
|
if (nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE) VIRTUAL_UseLargeAddressSpace();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue