Bug 1681123 - Bump mingw-w64 revision to fix _aligned_malloc in clang 12. r=tjr, a=RyanVM
clang 12 (specifically https://reviews.llvm.org/D91379) made some refactorings to libc++ that exposed a problem in the MinGW headers. That has now been fixed upstream.
In the meantime the headers also gained definitions for ProcessPayloadRestrictionPolicy, so we can remove our workaround for that.
Differential Revision:
https://phabricator.services.mozilla.com/D98945
--- a/mozglue/misc/WindowsProcessMitigations.cpp
+++ b/mozglue/misc/WindowsProcessMitigations.cpp
@@ -10,44 +10,16 @@
#include <processthreadsapi.h>
#if (_WIN32_WINNT < 0x0602)
BOOL WINAPI GetProcessMitigationPolicy(
HANDLE hProcess, PROCESS_MITIGATION_POLICY MitigationPolicy, PVOID lpBuffer,
SIZE_T dwLength);
#endif // (_WIN32_WINNT < 0x0602)
-// MinGW does not have these definitions in winnt.h yet
-#if defined(__MINGW32__)
-constexpr PROCESS_MITIGATION_POLICY ProcessPayloadRestrictionPolicy =
- static_cast<PROCESS_MITIGATION_POLICY>(12);
-
-typedef struct _PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY {
- union {
- DWORD Flags;
- struct {
- DWORD EnableExportAddressFilter : 1;
- DWORD AuditExportAddressFilter : 1;
- DWORD EnableExportAddressFilterPlus : 1;
- DWORD AuditExportAddressFilterPlus : 1;
- DWORD EnableImportAddressFilter : 1;
- DWORD AuditImportAddressFilter : 1;
- DWORD EnableRopStackPivot : 1;
- DWORD AuditRopStackPivot : 1;
- DWORD EnableRopCallerCheck : 1;
- DWORD AuditRopCallerCheck : 1;
- DWORD EnableRopSimExec : 1;
- DWORD AuditRopSimExec : 1;
- DWORD ReservedFlags : 20;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
-} PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY,
- *PPROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY;
-#endif // defined(__MINGW32__)
-
namespace mozilla {
static decltype(&::GetProcessMitigationPolicy)
FetchGetProcessMitigationPolicyFunc() {
static const StaticDynamicallyLinkedFunctionPtr<decltype(
&::GetProcessMitigationPolicy)>
pGetProcessMitigationPolicy(L"kernel32.dll",
"GetProcessMitigationPolicy");
--- a/taskcluster/ci/fetch/toolchains.yml
+++ b/taskcluster/ci/fetch/toolchains.yml
@@ -360,17 +360,17 @@ fxc2:
repo: https://github.com/mozilla/fxc2
revision: 63ad74b7faa7033f2c1be9cc1cd0225241a1a9a5
mingw-w64:
description: mingw-w64 source code
fetch:
type: git
repo: https://git.code.sf.net/p/mingw-w64/mingw-w64
- revision: bd8ca6c303658659496d0c440cf9f2baa8f7a5f0
+ revision: 660e09f3cb20f181b6d6435cb623d65a3922a063
libunwind:
description: libunwind source code
fetch:
type: git
repo: https://github.com/llvm-mirror/libunwind
revision: efd17a11b0fae29d3414e11e99307e082d4ee949