From bb5c9b21571afe88c92f15aaf2974999460e9ac8 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 7 Jan 2020 22:29:20 +0100 Subject: [PATCH] Leave all thread cleanup to Windows when DLL_PROCESS_DETACH happens trying to do an orderly shutdown of threads here is likely to cause a deadlock - DllMain is called while the loader lock is held, also event handling is serialized in this situation so thread exit signals cannot get delivered until DllMain itself returns. --- driver/others/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/others/memory.c b/driver/others/memory.c index 55dce72b88..4d623bd015 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -3146,7 +3146,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: - gotoblas_quit(); + /* gotoblas_quit(); */ break; default: break;