From 07befb3f1c50a5eb6ff477d5e8030eb14b2ed6d9 Mon Sep 17 00:00:00 2001 From: Gerald Squelart Date: Tue, 6 Sep 2022 00:15:22 +0000 Subject: [PATCH] Bug 1788859 - Suppress stack-walking while calling LdrLoadDll in WindowsDllBlocklist.cpp - r=florian Stack-walking during some Windows API calls result in deadlocks, see details in StackWalk.cpp. Differential Revision: https://phabricator.services.mozilla.com/D156276 --- toolkit/xre/dllservices/mozglue/WindowsDllBlocklist.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/toolkit/xre/dllservices/mozglue/WindowsDllBlocklist.cpp b/toolkit/xre/dllservices/mozglue/WindowsDllBlocklist.cpp index 43be15a1be62..83b2b54d2cd8 100644 --- a/toolkit/xre/dllservices/mozglue/WindowsDllBlocklist.cpp +++ b/toolkit/xre/dllservices/mozglue/WindowsDllBlocklist.cpp @@ -525,7 +525,12 @@ continue_loading: NTSTATUS ret; HANDLE myHandle; - ret = stub_LdrLoadDll(filePath, flags, moduleFileName, &myHandle); + { +#if defined(_M_AMD64) || defined(_M_ARM64) + AutoSuppressStackWalking suppress; +#endif + ret = stub_LdrLoadDll(filePath, flags, moduleFileName, &myHandle); + } if (handle) { *handle = myHandle;