Bug 1496173 - More aarch64 interceptor fixups. r=mhowell

This commit is contained in:
David Major 2018-10-03 17:01:05 -04:00
Родитель 1059b10ebc
Коммит 46eec958f3
3 изменённых файлов: 14 добавлений и 9 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -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<uintptr_t> instance = tramp.ReadEncodedPointer();
if (!instance) {

Просмотреть файл

@ -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);
}