Disable using JitType_JitMemory on 5.0.0+, resulting in falling back to JitType_CodeMemory if available.

This commit is contained in:
yellows8 2018-05-21 14:04:20 -04:00
parent 726f8adfe3
commit 93957370a9

View File

@ -14,7 +14,8 @@ Result jitCreate(Jit* j, size_t size)
JitType type;
// Use new jit primitive introduced in 4.0.0, if available.
if (kernelAbove400() && envIsSyscallHinted(0x4B) && envIsSyscallHinted(0x4C)) {
// Not usable with 5.0.0+ since svcMapJitMemory doesn't allow using that SVC under the same process which owns that object.
if (kernelAbove400() && !kernelAbove500() && envIsSyscallHinted(0x4B) && envIsSyscallHinted(0x4C)) {
type = JitType_JitMemory;
}
// Fall back to MapProcessCodeMemory if available.