Make JIT memory read-only after patching is done

This commit is contained in:
SChernykh 2019-01-19 11:22:54 +01:00
parent 897ff83dcd
commit 31a571dc70
4 changed files with 15 additions and 0 deletions

View file

@ -118,6 +118,7 @@ void xmrig::CpuThread::patchAsmVariants()
patchCode(cn_half_mainloop_bulldozer_asm, cnv2_mainloop_bulldozer_asm, xmrig::CRYPTONIGHT_HALF_ITER, xmrig::CRYPTONIGHT_MASK);
patchCode(cn_half_double_mainloop_sandybridge_asm, cnv2_double_mainloop_sandybridge_asm, xmrig::CRYPTONIGHT_HALF_ITER, xmrig::CRYPTONIGHT_MASK);
Mem::protectExecutableMemory(base, allocation_size);
Mem::flushInstructionCache(base, allocation_size);
}
#endif