Implement vm::page_executable (#6330)

Fixes segfaults when attenpting to set segfaults on non-executable memory.
This commit is contained in:
Eladash 2019-08-11 21:04:17 +03:00 committed by Ivan
parent 94d33003a3
commit 3ce18fd960
5 changed files with 15 additions and 17 deletions

View file

@ -271,6 +271,7 @@ extern void ppu_register_range(u32 addr, u32 size)
// Register executable range at
utils::memory_commit(&ppu_ref(addr), size * 2, utils::protection::rw);
vm::page_protect(addr, align(size, 0x10000), 0, vm::page_executable);
const u32 fallback = ::narrow<u32>(g_cfg.core.ppu_decoder == ppu_decoder_type::llvm ?
reinterpret_cast<uptr>(ppu_recompiler_fallback) : reinterpret_cast<uptr>(ppu_fallback));