Zebediah Figura : ntdll: Set the process detaching flag before calling FLS callbacks.
Alexandre Julliard
julliard at winehq.org
Thu Jan 7 15:35:59 CST 2021
Module: wine
Branch: master
Commit: 16592ca918999dd28764e071384361ea44bdf11d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=16592ca918999dd28764e071384361ea44bdf11d
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Jan 7 09:51:02 2021 -0600
ntdll: Set the process detaching flag before calling FLS callbacks.
So that we will not deadlock trying to acquire fls_section.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/loader.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 9b7e30b2c2b..3f43062f9f8 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3182,12 +3182,14 @@ fail:
*/
void WINAPI LdrShutdownProcess(void)
{
+ BOOL detaching = process_detaching;
+
TRACE("()\n");
- if (!process_detaching)
+ process_detaching = TRUE;
+ if (!detaching)
RtlProcessFlsData( NtCurrentTeb()->FlsSlots, 1 );
- process_detaching = TRUE;
process_detach();
}
More information about the wine-cvs
mailing list