[PATCH 0/1] MR9890: ntdll: Avoid infinite wait during process termination.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59178 Genshin Impact calls TpReleaseCleanupGroupMembers from a DllMain receiving DLL_PROCESS_DETACH. At that point all the worker threads are dead, so if one got killed while running a callback, cleanup will wait forever. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9890
From: Ziia Shi <mkrsym1@gmail.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59178 --- dlls/ntdll/threadpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 4f707bdd782..64a25694467 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -2083,7 +2083,7 @@ static void tp_object_wait( struct threadpool_object *object, BOOL group_wait ) struct threadpool *pool = object->pool; RtlEnterCriticalSection( &pool->cs ); - while (!object_is_finished( object, group_wait )) + while (!RtlDllShutdownInProgress() && !object_is_finished( object, group_wait )) { if (group_wait) RtlSleepConditionVariableCS( &object->group_finished_event, &pool->cs, NULL ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9890
participants (2)
-
Ziia Shi -
Ziia Shi (@mkrsym1)