Bug 1546546: Never unhook DLL-intercepted methods upon VMSharingPolicyShared destruction r=aklotz
☠☠ backed out by dbb622ba7d37 ☠ ☠
authorDavid Parks <dparks@mozilla.com>
Thu, 25 Apr 2019 17:10:24 +0000
changeset 530164 3096a547bb84ea6bdf0f543b36591e920c90ae51
parent 530163 d6c676a1ef3e239e66e71b31e1d6570efa52df2d
child 530165 bd68b6dfd83e13a9ec3ff273b17fcb1992ae10ec
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz
bugs1546546
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1546546: Never unhook DLL-intercepted methods upon VMSharingPolicyShared destruction r=aklotz This patch fixes a static destructor order dependency between WindowsDllInterceptor and VMSharingPolicyUnique by telling VMSharingPolicyShared not to access the VMSharingPolicyUnique at destruction. See the bug for details of the order dependency. Differential Revision: https://phabricator.services.mozilla.com/D28764
mozglue/misc/interceptor/VMSharingPolicies.h
--- a/mozglue/misc/interceptor/VMSharingPolicies.h
+++ b/mozglue/misc/interceptor/VMSharingPolicies.h
@@ -100,18 +100,19 @@ class VMSharingPolicyShared<MMPolicyInPr
   }
 
   operator const MMPolicyInProcess&() const {
     AutoCriticalSection lock(&sCS);
     return sUniqueVM;
   }
 
   bool ShouldUnhookUponDestruction() const {
-    AutoCriticalSection lock(&sCS);
-    return sUniqueVM.ShouldUnhookUponDestruction();
+    // Unhooking on destruction has issues with static destructor order.
+    // See bug 1546546.
+    return false;
   }
 
   bool Reserve(uint32_t aCount, const ReservationFlags aFlags) {
     AutoCriticalSection lock(&sCS);
     return sUniqueVM.Reserve(aCount, aFlags);
   }
 
   bool IsPageAccessible(void* aVAddress) const {