From ac1cbfd25b46d82bb6d345d479a0374772952d84 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Fri, 2 Sep 2022 09:17:50 +0000 Subject: [PATCH] Bug 1788689 - Disable MITIGATION_DYNAMIC_CODE_DISABLE for more MinGW r=bobowen Differential Revision: https://phabricator.services.mozilla.com/D156273 --- security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp index 13814db679c5..bdcf124e98c8 100644 --- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp +++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp @@ -1336,11 +1336,15 @@ bool SandboxBroker::SetSecurityLevelForUtilityProcess( sandbox::MITIGATION_DLL_SEARCH_ORDER; // TODO: Bug 1766432 - Investigate why this crashes in MSAudDecMFT.dll during // Utility AudioDecoder process startup only on 32-bits systems. + // // Investigate also why it crashes (no idea where exactly) for MinGW64 builds + // on 32 and 64 archs // // TODO: Bug 1773005 - AAC seems to not work on Windows < 1703 if (aSandbox != mozilla::ipc::SandboxingKind::UTILITY_AUDIO_DECODING_WMF) { +#if !defined(__MINGW32__) && !defined(__MINGW64__) mitigations |= sandbox::MITIGATION_DYNAMIC_CODE_DISABLE; +#endif // !defined(__MINGW32__) && !defined(__MINGW64__) } else { if (IsWin10CreatorsUpdateOrLater()) { #if defined(_M_X64) && !defined(__MINGW64__)