1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-24 19:52:37 +01:00

Fix crash in JIT when compiling LLVM blocks

This commit is contained in:
kd-11 2024-08-25 20:51:58 +03:00 committed by kd-11
parent 4f97ea8da7
commit 56d35bf409

View File

@ -185,8 +185,13 @@ static u8* add_jit_memory(usz size, usz align)
if (olda != newa) [[unlikely]] if (olda != newa) [[unlikely]]
{ {
#ifndef CAN_OVERCOMMIT #ifndef CAN_OVERCOMMIT
// Commit more memory // Commit more memory.
// NOTE: Calling memory commit in parallel on the same addresses can throw a permission error.
{
static std::mutex mcommit_lock;
std::lock_guard lock(mcommit_lock);
utils::memory_commit(pointer + olda, newa - olda, Prot); utils::memory_commit(pointer + olda, newa - olda, Prot);
}
#endif #endif
// Acknowledge committed memory // Acknowledge committed memory
Ctr.atomic_op([&](u64& ctr) Ctr.atomic_op([&](u64& ctr)