1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00

vm.cpp: Fix emulation stopping on SPU access violation (#12586)

This commit is contained in:
Elad Ashkenazi 2022-09-01 18:23:18 +03:00 committed by GitHub
parent 58e3232710
commit 5a0a5d9ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "vm_locking.h"
#include "vm_ptr.h"
#include "vm_ref.h"
@ -200,7 +200,7 @@ namespace vm
break;
}
u32 test = 0;
u32 test = umax;
for (u32 i = begin / 4096, max = (begin + size - 1) / 4096; i <= max; i++)
{
@ -211,13 +211,13 @@ namespace vm
}
}
if (test)
if (test != umax)
{
range_lock->release(0);
// Try triggering a page fault (write)
// TODO: Read memory if needed
vm::_ref<atomic_t<u8>>(test) += 0;
vm::_ref<atomic_t<u8>>(test / 4096 == begin / 4096 ? begin : test) += 0;
continue;
}
}