Bug 1681123 - Bump mingw-w64 revision to fix _aligned_malloc in clang 12. r=tjr, a=RyanVM
authorDavid Major <dmajor@mozilla.com>
Mon, 07 Dec 2020 17:55:27 +0000 (2020-12-07)
changeset 600475 d726d74daa39c8413750f29f75a49a06f3b55b07
parent 600474 1b0e1f0d885ef849e75b409d4795271f635ebe0c
child 600476 53999ac8db916fe4234ea0ace08f15ce9d729b81
push id219
push userryanvm@gmail.com
push dateThu, 11 Mar 2021 02:13:18 +0000 (2021-03-11)
treeherdermozilla-esr78@7e82ead34b59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstjr, RyanVM
bugs1681123
milestone78.9.0
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
mozglue/misc/WindowsProcessMitigations.cpp
taskcluster/ci/fetch/toolchains.yml
--- 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