diff --git a/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch b/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch index 87a0347d..e0250818 100644 --- a/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch +++ b/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch @@ -1,48 +1,60 @@ -From 0a8a91199763c531cebeed0f60581df2e5ed36cf Mon Sep 17 00:00:00 2001 +From 0ade58381888bf379212b2d1cc9e449774d3548c Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 2 Oct 2014 19:44:31 +0200 -Subject: [PATCH] kernel32: Add winediag message to show warning, that this - isn't vanilla wine. +Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging + branch name and version. --- - dlls/kernel32/process.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) + dlls/ntdll/loader.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) -diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index 9d725e1a43b..9c678039dad 100644 ---- a/dlls/kernel32/process.c -+++ b/dlls/kernel32/process.c -@@ -60,6 +60,7 @@ - - WINE_DEFAULT_DEBUG_CHANNEL(process); - WINE_DECLARE_DEBUG_CHANNEL(relay); +diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c +index 65abf889cb2..d0fede661ce 100644 +--- a/dlls/ntdll/loader.c ++++ b/dlls/ntdll/loader.c +@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay); + WINE_DECLARE_DEBUG_CHANNEL(snoop); + WINE_DECLARE_DEBUG_CHANNEL(loaddll); + WINE_DECLARE_DEBUG_CHANNEL(imports); +WINE_DECLARE_DEBUG_CHANNEL(winediag); - typedef struct - { -@@ -125,6 +126,7 @@ static inline DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry ) + #ifdef _WIN64 + #define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232) +@@ -3486,6 +3487,7 @@ static void process_breakpoint(void) + __ENDTRY } - #endif +extern const char * CDECL wine_get_version(void); - /*********************************************************************** - * __wine_start_process - * -@@ -146,6 +148,14 @@ void CDECL __wine_start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) - TRACE_(relay)( "\1Starting process %s (entryproc=%p)\n", - debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry ); -+ if (CreateEventA(0, 0, 0, "__winestaging_warn_event") && GetLastError() != ERROR_ALREADY_EXISTS) + /****************************************************************** + * LdrInitializeThunk (NTDLL.@) +@@ -3496,6 +3498,9 @@ static void process_breakpoint(void) + void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 ) + { + static const unsigned int fls_slot_count = 8 * sizeof(NtCurrentTeb()->Peb->FlsBitmapBits); ++ OBJECT_ATTRIBUTES staging_event_attr; ++ UNICODE_STRING staging_event_string; ++ HANDLE staging_event; + static int attach_done; + int i; + NTSTATUS status; +@@ -3514,6 +3519,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR + entry = (void **)&context->u.s.X0; + #endif + ++ RtlInitUnicodeString( &staging_event_string, L"__wine_staging_warn_event" ); ++ InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL ); ++ if (NtCreateEvent( &staging_event, EVENT_ALL_ACCESS, &staging_event_attr, NotificationEvent, FALSE ) == STATUS_SUCCESS) + { -+ FIXME_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version()); ++ FIXME_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version()); + FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n"); + } + else -+ WARN_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version()); ++ WARN_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version()); + - __TRY - { - ExitThread( call_process_entry( peb, entry )); + if (process_detaching) NtTerminateThread( GetCurrentThread(), 0 ); + + RtlEnterCriticalSection( &loader_section ); -- 2.28.0 diff --git a/patches/Staging/definition b/patches/Staging/definition new file mode 100644 index 00000000..29bb50f1 --- /dev/null +++ b/patches/Staging/definition @@ -0,0 +1 @@ +Depends: ntdll-FLS_Callbacks diff --git a/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch b/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch index 232a4090..c67fc012 100644 --- a/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch +++ b/patches/kernel32-SetProcessDEPPolicy/0001-kernel32-Implement-SetProcessDEPPolicy.patch @@ -1,4 +1,4 @@ -From 9d11c18b9b5a40114d28445a01347950de0d7df2 Mon Sep 17 00:00:00 2001 +From 9a269d58ea099e115857ffe72700fdb7d5948ad5 Mon Sep 17 00:00:00 2001 From: "Olivier F. R. Dierick" Date: Tue, 19 Apr 2016 07:25:39 +0200 Subject: [PATCH] kernel32: Implement SetProcessDEPPolicy(). @@ -8,10 +8,10 @@ Subject: [PATCH] kernel32: Implement SetProcessDEPPolicy(). 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index 71d6800f547..5423adced3c 100644 +index ff4e79ff2b7..5c25920ba5b 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c -@@ -71,6 +71,8 @@ typedef struct +@@ -68,6 +68,8 @@ typedef struct DWORD dwReserved; } LOADPARMS32; @@ -20,23 +20,23 @@ index 71d6800f547..5423adced3c 100644 HMODULE kernel32_handle = 0; SYSTEM_BASIC_INFORMATION system_info = { 0 }; -@@ -86,6 +88,7 @@ const WCHAR DIR_System[] = {'C',':','\\','w','i','n','d','o','w','s', +@@ -83,6 +85,7 @@ const WCHAR DIR_System[] = {'C',':','\\','w','i','n','d','o','w','s', #define PDB32_FILE_APIS_OEM 0x0040 /* File APIs are OEM */ #define PDB32_WIN32S_PROC 0x8000 /* Win32s process */ +static DEP_SYSTEM_POLICY_TYPE system_DEP_policy = OptIn; - #ifdef __i386__ - extern DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry ); -@@ -177,7 +180,6 @@ void CDECL __wine_start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) - abort(); /* should not be reached */ + /*********************************************************************** + * wait_input_idle +@@ -201,7 +204,6 @@ DWORD WINAPI LoadModule( LPCSTR name, LPVOID paramBlock ) + return ret; } - /*********************************************************************** - * wait_input_idle + * ExitProcess (KERNEL32.@) * -@@ -872,9 +874,35 @@ DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy(void) +@@ -586,9 +588,35 @@ DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy(void) */ BOOL WINAPI SetProcessDEPPolicy(DWORD newDEP) { @@ -76,5 +76,5 @@ index 71d6800f547..5423adced3c 100644 /********************************************************************** -- -2.17.1 +2.28.0 diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index ab71a2fd..cd42eb4e 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From 951620002f57760b9bfb915c0b5d99e72d47dcc0 Mon Sep 17 00:00:00 2001 +From 443896688d090de7b35a794ae6dad87865312dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 3 Apr 2017 05:30:27 +0200 Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. 3 files changed, 140 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index 3dee67d5a91..3623d9d99a1 100644 +index 757a230ae15..466e5a444f4 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -30,6 +30,7 @@ @@ -21,7 +21,7 @@ index 3dee67d5a91..3623d9d99a1 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -3957,6 +3958,79 @@ static void test_LoadPackagedLibrary(void) +@@ -3970,6 +3971,79 @@ static void test_LoadPackagedLibrary(void) h, GetLastError()); } @@ -101,7 +101,7 @@ index 3dee67d5a91..3623d9d99a1 100644 START_TEST(loader) { int argc; -@@ -4029,6 +4103,7 @@ START_TEST(loader) +@@ -4042,6 +4116,7 @@ START_TEST(loader) test_InMemoryOrderModuleList(); test_LoadPackagedLibrary(); test_wow64_redirection(); @@ -110,7 +110,7 @@ index 3dee67d5a91..3623d9d99a1 100644 test_dll_file( "kernel32.dll", TRUE ); test_dll_file( "advapi32.dll", TRUE ); diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 656db6ee579..05aac8a65f7 100644 +index 7370857cfdc..78ae9b26f22 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -122,6 +122,9 @@ struct file_id @@ -123,7 +123,7 @@ index 656db6ee579..05aac8a65f7 100644 /* internal representation of loaded modules */ typedef struct _wine_modref { -@@ -481,6 +484,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) +@@ -461,6 +464,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) } } @@ -176,7 +176,7 @@ index 656db6ee579..05aac8a65f7 100644 /************************************************************************* * get_modref * -@@ -1222,7 +1271,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name +@@ -1202,7 +1251,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name &wm->ldr.InLoadOrderLinks); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks); @@ -189,7 +189,7 @@ index 656db6ee579..05aac8a65f7 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -1953,6 +2007,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, +@@ -1909,6 +1963,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -197,7 +197,7 @@ index 656db6ee579..05aac8a65f7 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3303,6 +3358,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3246,6 +3301,7 @@ static void free_modref( WINE_MODREF *wm ) { RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -205,7 +205,7 @@ index 656db6ee579..05aac8a65f7 100644 if (wm->ldr.InInitializationOrderLinks.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderLinks); -@@ -4003,6 +4059,7 @@ static void process_init(void) +@@ -3950,6 +4006,7 @@ static void process_init(void) INITIAL_TEB stack; TEB *teb = NtCurrentTeb(); PEB *peb = teb->Peb; @@ -213,7 +213,7 @@ index 656db6ee579..05aac8a65f7 100644 peb->LdrData = &ldr; peb->FastPebLock = &peb_lock; -@@ -4042,6 +4099,10 @@ static void process_init(void) +@@ -3988,6 +4045,10 @@ static void process_init(void) load_global_options(); version_init(); @@ -224,21 +224,21 @@ index 656db6ee579..05aac8a65f7 100644 /* setup the load callback and create ntdll modref */ RtlInitUnicodeString( &nt_name, ntdllW ); NtQueryVirtualMemory( GetCurrentProcess(), process_init, MemoryBasicInformation, -@@ -4128,6 +4189,9 @@ static void process_init(void) +@@ -4073,6 +4134,9 @@ static void process_init(void) + teb->Tib.StackBase = stack.StackBase; teb->Tib.StackLimit = stack.StackLimit; teb->DeallocationStack = stack.DeallocationStack; - ++ + /* the windows version was not set yet when ntdll and kernel32 were loaded */ + recompute_hash_map(); -+ - unix_funcs->server_init_process_done( kernel32_start_process ); } + /*********************************************************************** diff --git a/include/winternl.h b/include/winternl.h -index dceed34340a..dca18cab8ff 100644 +index 6c809193977..2d15f95c110 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -2679,8 +2679,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY +@@ -2678,8 +2678,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY ULONG Flags; SHORT LoadCount; SHORT TlsIndex; diff --git a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch index f3e0a1eb..bc636435 100644 --- a/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch +++ b/patches/ntdll-WRITECOPY/0003-ntdll-Setup-a-temporary-signal-handler-during-proces.patch @@ -1,4 +1,4 @@ -From 56a7847900cca65126f586cb58f65ba46af203b5 Mon Sep 17 00:00:00 2001 +From 1703abc6afb86f5427ba73bcf6384bdea6d0eb69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 4 Oct 2014 02:53:22 +0200 Subject: [PATCH] ntdll: Setup a temporary signal handler during process @@ -15,10 +15,10 @@ Subject: [PATCH] ntdll: Setup a temporary signal handler during process 7 files changed, 74 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index 69ea69ad530..c5834cd58fa 100644 +index 6f25f4ae87e..f9a26e6a531 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -1649,6 +1649,7 @@ void __wine_main( int argc, char *argv[], char *envp[] ) +@@ -1657,6 +1657,7 @@ void __wine_main( int argc, char *argv[], char *envp[] ) #endif virtual_init(); @@ -27,10 +27,10 @@ index 69ea69ad530..c5834cd58fa 100644 init_environment( argc, argv, envp ); diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c -index be8e5e4b735..1f01305f629 100644 +index 89baf6db3df..f5c683ec4e1 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c -@@ -980,6 +980,12 @@ void signal_init_process(void) +@@ -979,6 +979,12 @@ void signal_init_process(void) exit(1); } @@ -44,10 +44,10 @@ index be8e5e4b735..1f01305f629 100644 /*********************************************************************** * init_thread_context diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c -index 169f50985e9..ccdd438b62a 100644 +index cfe1c75b59f..c599ce8d308 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c -@@ -1080,6 +1080,13 @@ void signal_init_process(void) +@@ -1074,6 +1074,13 @@ void signal_init_process(void) exit(1); } @@ -62,10 +62,10 @@ index 169f50985e9..ccdd438b62a 100644 * init_thread_context */ diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c -index bb11b50f8f7..6b5a5c6c82f 100644 +index 5d4d1469472..73216888dd9 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c -@@ -1815,6 +1815,30 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, void *stack_ptr, +@@ -1809,6 +1809,30 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, void *stack_ptr, } @@ -96,7 +96,7 @@ index bb11b50f8f7..6b5a5c6c82f 100644 /********************************************************************** * segv_handler * -@@ -2374,6 +2398,34 @@ void signal_init_process(void) +@@ -2368,6 +2392,34 @@ void signal_init_process(void) exit(1); } @@ -132,10 +132,10 @@ index bb11b50f8f7..6b5a5c6c82f 100644 /*********************************************************************** * init_thread_context diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c -index 6b57d0cdb1b..db608b358ea 100644 +index c74b8be32b8..d28b7cce8ee 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c -@@ -2636,6 +2636,12 @@ void signal_init_process(void) +@@ -2627,6 +2627,12 @@ void signal_init_process(void) exit(1); } @@ -149,19 +149,19 @@ index 6b57d0cdb1b..db608b358ea 100644 /*********************************************************************** * init_thread_context diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index b55eb571283..806abc21fb2 100644 +index ce3c14d2594..44a2b5712f5 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -227,6 +227,7 @@ extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN; +@@ -217,6 +217,7 @@ extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_init_thread( TEB *teb ) DECLSPEC_HIDDEN; extern void signal_init_process(void) DECLSPEC_HIDDEN; +extern void signal_init_early(void) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE entry, void *arg, - BOOL suspend, void *relay, void *thunk, TEB *teb ) DECLSPEC_HIDDEN; + BOOL suspend, void *thunk, TEB *teb ) DECLSPEC_HIDDEN; extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int) ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c -index e3f2820de56..0d2dd6f019d 100644 +index 58c84caab5f..ad2f959d61c 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2886,7 +2886,7 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack ) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index eec513f3..7228c6e9 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "518d06404ad70aa9812a77d019a18fe79c16f831" + echo "00a0e2cd8c4df240371ddd22516e4e3544a142ce" } # Show version information @@ -1731,6 +1731,13 @@ if test "$enable_nvapi_Stub_DLL" -eq 1; then enable_nvcuda_CUDA_Support=1 fi +if test "$enable_Staging" -eq 1; then + if test "$enable_ntdll_FLS_Callbacks" -gt 1; then + abort "Patchset ntdll-FLS_Callbacks disabled, but Staging depends on that." + fi + enable_ntdll_FLS_Callbacks=1 +fi + # If autoupdate is enabled then create a tempfile to keep track of all patches if test "$enable_patchlist" -eq 1; then @@ -1804,10 +1811,39 @@ if test "$enable_Pipelight" -eq 1; then ) >> "$patchlist" fi -# Patchset Staging +# Patchset ntdll-FLS_Callbacks +# | +# | This patchset fixes the following Wine bugs: +# | * [#49012] Application build with .NET CoreRT crashes due to FLS callbacks not being called # | # | Modified files: -# | * dlls/kernel32/process.c, dlls/ntdll/Makefile.in, include/wine/library.h, libs/wine/Makefile.in, libs/wine/config.c, +# | * dlls/kernel32/tests/fiber.c, dlls/kernel32/tests/loader.c, dlls/kernel32/tests/thread.c, dlls/kernelbase/thread.c, +# | dlls/ntdll/loader.c +# | +if test "$enable_ntdll_FLS_Callbacks" -eq 1; then + patch_apply ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch + patch_apply ntdll-FLS_Callbacks/0002-kernelbase-Don-t-use-PEB-lock-for-FLS-data.patch + patch_apply ntdll-FLS_Callbacks/0003-kernelbase-Zero-all-FLS-slots-instances-in-FlsFree.patch + patch_apply ntdll-FLS_Callbacks/0004-ntdll-Call-FLS-callbacks-on-thread-shutdown.patch + patch_apply ntdll-FLS_Callbacks/0005-kernelbase-Call-FLS-callbacks-from-FlsFree.patch + patch_apply ntdll-FLS_Callbacks/0006-kernelbase-Call-FLS-callbacks-from-DeleteFiber.patch + ( + printf '%s\n' '+ { "Paul Gofman", "kernelbase: Maintain FLS storage list in PEB.", 1 },'; + printf '%s\n' '+ { "Paul Gofman", "kernelbase: Don'\''t use PEB lock for FLS data.", 1 },'; + printf '%s\n' '+ { "Paul Gofman", "kernelbase: Zero all FLS slots instances in FlsFree().", 1 },'; + printf '%s\n' '+ { "Paul Gofman", "ntdll: Call FLS callbacks on thread shutdown.", 1 },'; + printf '%s\n' '+ { "Paul Gofman", "kernelbase: Call FLS callbacks from FlsFree().", 1 },'; + printf '%s\n' '+ { "Paul Gofman", "kernelbase: Call FLS callbacks from DeleteFiber().", 1 },'; + ) >> "$patchlist" +fi + +# Patchset Staging +# | +# | This patchset has the following (direct or indirect) dependencies: +# | * ntdll-FLS_Callbacks +# | +# | Modified files: +# | * dlls/ntdll/Makefile.in, dlls/ntdll/loader.c, include/wine/library.h, libs/wine/Makefile.in, libs/wine/config.c, # | libs/wine/wine.map, loader/main.c # | if test "$enable_Staging" -eq 1; then @@ -1815,7 +1851,7 @@ if test "$enable_Staging" -eq 1; then patch_apply Staging/0002-winelib-Append-Staging-at-the-end-of-the-version-s.patch patch_apply Staging/0003-loader-Add-commandline-option-patches-to-show-the-pa.patch ( - printf '%s\n' '+ { "Sebastian Lackner", "kernel32: Add winediag message to show warning, that this isn'\''t vanilla wine.", 1 },'; + printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Print a warning message specifying the wine-staging branch name and version.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "winelib: Append '\''(Staging)'\'' at the end of the version string.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "loader: Add commandline option --patches to show the patch list.", 1 },'; ) >> "$patchlist" @@ -3361,32 +3397,6 @@ if test "$enable_ntdll_Activation_Context" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-FLS_Callbacks -# | -# | This patchset fixes the following Wine bugs: -# | * [#49012] Application build with .NET CoreRT crashes due to FLS callbacks not being called -# | -# | Modified files: -# | * dlls/kernel32/tests/fiber.c, dlls/kernel32/tests/loader.c, dlls/kernel32/tests/thread.c, dlls/kernelbase/thread.c, -# | dlls/ntdll/loader.c -# | -if test "$enable_ntdll_FLS_Callbacks" -eq 1; then - patch_apply ntdll-FLS_Callbacks/0001-kernelbase-Maintain-FLS-storage-list-in-PEB.patch - patch_apply ntdll-FLS_Callbacks/0002-kernelbase-Don-t-use-PEB-lock-for-FLS-data.patch - patch_apply ntdll-FLS_Callbacks/0003-kernelbase-Zero-all-FLS-slots-instances-in-FlsFree.patch - patch_apply ntdll-FLS_Callbacks/0004-ntdll-Call-FLS-callbacks-on-thread-shutdown.patch - patch_apply ntdll-FLS_Callbacks/0005-kernelbase-Call-FLS-callbacks-from-FlsFree.patch - patch_apply ntdll-FLS_Callbacks/0006-kernelbase-Call-FLS-callbacks-from-DeleteFiber.patch - ( - printf '%s\n' '+ { "Paul Gofman", "kernelbase: Maintain FLS storage list in PEB.", 1 },'; - printf '%s\n' '+ { "Paul Gofman", "kernelbase: Don'\''t use PEB lock for FLS data.", 1 },'; - printf '%s\n' '+ { "Paul Gofman", "kernelbase: Zero all FLS slots instances in FlsFree().", 1 },'; - printf '%s\n' '+ { "Paul Gofman", "ntdll: Call FLS callbacks on thread shutdown.", 1 },'; - printf '%s\n' '+ { "Paul Gofman", "kernelbase: Call FLS callbacks from FlsFree().", 1 },'; - printf '%s\n' '+ { "Paul Gofman", "kernelbase: Call FLS callbacks from DeleteFiber().", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-ApiSetMap # | # | This patchset has the following (direct or indirect) dependencies: diff --git a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch index 7456ffa2..29729674 100644 --- a/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch +++ b/patches/wow64cpu-Wow64Transition/0002-ntdll-Add-a-stub-implementation-of-Wow64Transition.patch @@ -1,4 +1,4 @@ -From d104c248c1ebdb642f7093e039f5a33c6d4beee0 Mon Sep 17 00:00:00 2001 +From 20f0c51c7cc6bf2df12463f8e8b98d57fd028d26 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 8 Aug 2018 20:00:15 -0500 Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition. @@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition. 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index d09948c51aa..871e58b0b52 100644 +index 7370857cfdc..b3830317b11 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -4145,6 +4145,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) +@@ -3929,6 +3929,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) return TRUE; } @@ -20,7 +20,7 @@ index d09948c51aa..871e58b0b52 100644 /*********************************************************************** * process_init -@@ -4158,7 +4159,7 @@ static void process_init(void) +@@ -3942,7 +3943,7 @@ static void process_init(void) 's','y','s','t','e','m','3','2','\\', 'k','e','r','n','e','l','3','2','.','d','l','l',0}; RTL_USER_PROCESS_PARAMETERS *params; @@ -29,7 +29,7 @@ index d09948c51aa..871e58b0b52 100644 NTSTATUS status; ANSI_STRING func_name; UNICODE_STRING nt_name; -@@ -4223,6 +4224,13 @@ static void process_init(void) +@@ -4001,6 +4002,13 @@ static void process_init(void) MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); NtTerminateProcess( GetCurrentProcess(), status ); } @@ -40,14 +40,14 @@ index d09948c51aa..871e58b0b52 100644 + else + WARN( "could not load wow64cpu.dll, status %#x\n", status ); + - RtlInitAnsiString( &func_name, "__wine_start_process" ); + RtlInitAnsiString( &func_name, "BaseThreadInitThunk" ); if ((status = LdrGetProcedureAddress( wm->ldr.DllBase, &func_name, - 0, (void **)&kernel32_start_process )) != STATUS_SUCCESS) + 0, (void **)&pBaseThreadInitThunk )) != STATUS_SUCCESS) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 9acacaa149a..12eca16c31a 100644 +index 453c4827572..ad671846cc7 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1114,6 +1114,7 @@ +@@ -1123,6 +1123,7 @@ @ stdcall WinSqmIsOptedIn() @ stdcall WinSqmSetDWORD(ptr long long) @ stdcall WinSqmStartSession(ptr long long) diff --git a/staging/upstream-commit b/staging/upstream-commit index d9cfcfd7..bbf434d4 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -518d06404ad70aa9812a77d019a18fe79c16f831 +00a0e2cd8c4df240371ddd22516e4e3544a142ce