Added patch to process APC calls before starting process.

This commit is contained in:
Sebastian Lackner
2015-03-07 18:14:35 +01:00
parent c1ee00741d
commit 521e8aa38c
5 changed files with 55 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
From cca0753b28aba33ad72dcb2245a9fb80720b5bb8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 7 Mar 2015 18:09:37 +0100
Subject: ntdll: Process APC calls before starting process.
---
dlls/ntdll/loader.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index e1444d2..bab4a2f 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2878,6 +2878,7 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
ULONG_PTR unknown3, ULONG_PTR unknown4 )
{
static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0};
+ LARGE_INTEGER timeout;
NTSTATUS status;
WINE_MODREF *wm;
LPCWSTR load_path;
@@ -2921,6 +2922,10 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
virtual_release_address_space();
virtual_clear_thread_stack();
+
+ timeout.QuadPart = 0;
+ NtDelayExecution( TRUE, &timeout );
+
wine_switch_to_stack( start_process, kernel_start, NtCurrentTeb()->Tib.StackBase );
error:
--
2.3.0

View File

@@ -0,0 +1 @@
Fixes: Process APC calls before starting process

View File

@@ -122,6 +122,7 @@ patch_enable_all ()
enable_msvfw32_Image_Size="$1"
enable_netprofm_IConnectionPoint="$1"
enable_ntdll_APC_Performance="$1"
enable_ntdll_APC_Start_Process="$1"
enable_ntdll_DOS_Attributes="$1"
enable_ntdll_DVD_Read_Size="$1"
enable_ntdll_DllRedirects="$1"
@@ -409,6 +410,9 @@ patch_enable ()
ntdll-APC_Performance)
enable_ntdll_APC_Performance="$2"
;;
ntdll-APC_Start_Process)
enable_ntdll_APC_Start_Process="$2"
;;
ntdll-DOS_Attributes)
enable_ntdll_DOS_Attributes="$2"
;;
@@ -2667,6 +2671,18 @@ if test "$enable_ntdll_APC_Performance" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-APC_Start_Process
# |
# | Modified files:
# | * dlls/ntdll/loader.c
# |
if test "$enable_ntdll_APC_Start_Process" -eq 1; then
patch_apply ntdll-APC_Start_Process/0001-ntdll-Process-APC-calls-before-starting-process.patch
(
echo '+ { "Sebastian Lackner", "ntdll: Process APC calls before starting process.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-DOS_Attributes
# |
# | This patchset fixes the following Wine bugs: