Fix ppu_register_function_at with unaligned parameters (#17718)
This fixes some crashes in interpreter mode when calling functions like `sys_dbg_write_process_memory` to write data which may not be an instruction. --------- Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
This commit is contained in:
@@ -827,6 +827,9 @@ extern void ppu_register_function_at(u32 addr, u32 size, ppu_intrp_func_t ptr =
|
||||
return;
|
||||
}
|
||||
|
||||
size = utils::align<u32>(size + addr % 4, 4);
|
||||
addr &= -4;
|
||||
|
||||
if (g_cfg.core.ppu_decoder == ppu_decoder_type::llvm)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user