Alexandre Julliard : ntdll: Call TLS callbacks also for the main exe.

Alexandre Julliard julliard at winehq.org
Wed Apr 22 15:29:26 CDT 2020


Module: wine
Branch: master
Commit: 6f4272ce3e74f2d30f45bf0d407cdc9264b813a9
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6f4272ce3e74f2d30f45bf0d407cdc9264b813a9

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Apr 22 14:14:06 2020 +0200

ntdll: Call TLS callbacks also for the main exe.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48971
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/loader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 65f9d3f298..e26b9d6b7f 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4028,6 +4028,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
         }
         attach_implicitly_loaded_dlls( context );
         virtual_release_address_space();
+        if (wm->ldr.TlsIndex != -1) call_tls_callbacks( wm->ldr.BaseAddress, DLL_PROCESS_ATTACH );
         if (wm->so_handle) call_constructors( wm );
         if (wm->ldr.ActivationContext) RtlDeactivateActivationContext( 0, cookie );
     }




More information about the wine-cvs mailing list