Commit 23f76c5d authored by swift_gan's avatar swift_gan

disable jit >= 7.0

parent e7112454
......@@ -108,6 +108,11 @@ bool doHookWithInline(JNIEnv* env,
compileMethod(hookMethod, reinterpret_cast<void*>(threadId));
}
if (SDK_INT >= ANDROID_N) {
disableCompilable(originMethod);
SandHook::Trampoline::flushCache(reinterpret_cast<Size>(originMethod), SandHook::CastArtMethod::size);
}
SandHook::HookTrampoline* hookTrampoline = trampolineManager.installInlineTrampoline(originMethod, hookMethod, backupMethod);
if (hookTrampoline == nullptr)
return false;
......
......@@ -139,7 +139,7 @@ namespace SandHook {
flushCache((Size)code + targetOffset, len);
}
bool flushCache(Size addr, Size len) {
static bool flushCache(Size addr, Size len) {
#if defined(__arm__)
//clearCacheArm32(reinterpret_cast<char*>(addr), reinterpret_cast<char*>(addr + len));
int i = cacheflush(addr, addr + len, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment