diff --git a/browser/app/winlauncher/LauncherProcessWin.cpp b/browser/app/winlauncher/LauncherProcessWin.cpp index 6846821306c1..6ffbd3133c63 100644 --- a/browser/app/winlauncher/LauncherProcessWin.cpp +++ b/browser/app/winlauncher/LauncherProcessWin.cpp @@ -40,11 +40,12 @@ PostCreationSetup(HANDLE aChildProcess, HANDLE aChildMainThread, { // The launcher process's DLL blocking code is incompatible with ASAN because // it is able to execute before ASAN itself has even initialized. -#if defined(MOZ_ASAN) + // Also, the AArch64 build doesn't yet have a working interceptor. +#if defined(MOZ_ASAN) || defined(_M_ARM64) return true; #else return mozilla::InitializeDllBlocklistOOP(aChildProcess); -#endif // defiend(MOZ_ASAN) +#endif // defined(MOZ_ASAN) || defined(_M_ARM64) } #if !defined(PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON) diff --git a/mozglue/misc/interceptor/PatcherDetour.h b/mozglue/misc/interceptor/PatcherDetour.h index b23b4d74ea4c..95d05c4bd217 100644 --- a/mozglue/misc/interceptor/PatcherDetour.h +++ b/mozglue/misc/interceptor/PatcherDetour.h @@ -54,13 +54,17 @@ public: size_t nBytes = 2 + sizeof(intptr_t); #elif defined(_M_ARM64) size_t nBytes = 4; - MOZ_RELEASE_ASSERT(false, "Shouldn't get here"); #else #error "Unknown processor type" #endif const auto& tramps = this->mVMPolicy.Items(); for (auto&& tramp : tramps) { + +#if defined(_M_ARM64) + MOZ_RELEASE_ASSERT(false, "Shouldn't get here"); +#endif + // First we read the pointer to the interceptor instance. Maybe instance = tramp.ReadEncodedPointer(); if (!instance) { diff --git a/mozglue/misc/nsWindowsDllInterceptor.h b/mozglue/misc/nsWindowsDllInterceptor.h index 3fef4dc3452b..3f9bb16e0dc3 100644 --- a/mozglue/misc/nsWindowsDllInterceptor.h +++ b/mozglue/misc/nsWindowsDllInterceptor.h @@ -432,12 +432,6 @@ private: { // Generally, code should not call this method directly. Use AddHook unless // there is a specific need to avoid nop space patches. -#if defined(_M_ARM64) - // XXX: this is just to get things compiling; we'll have to add real - // support at some future point. - return false; -#endif - if (!mModule) { return false; } @@ -454,6 +448,12 @@ private: { MOZ_ASSERT(mModule && aProc); +#if defined(_M_ARM64) + // XXX: this is just to get things compiling; we'll have to add real + // support at some future point. + return false; +#endif + if (!mDetourPatcher.Initialized()) { mDetourPatcher.Init(mNHooks); }