mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
IsGood() check elimination
Reasons: 1) It's unsafe - we cannot guarantee that address is still good while it is used. 2) It's wrong in many modules which are usually just compare pointer with zero.
This commit is contained in:
parent
48514b0e93
commit
8f04ab07ed
52 changed files with 104 additions and 1450 deletions
|
|
@ -10,9 +10,6 @@ SysCallBase sys_prx("sys_prx");
|
|||
|
||||
s32 sys_prx_load_module(u32 path_addr, u64 flags, mem_ptr_t<sys_prx_load_module_option_t> pOpt)
|
||||
{
|
||||
if (!Memory.IsGoodAddr(path_addr))
|
||||
return CELL_PRX_ERROR_INVAL;
|
||||
|
||||
std::string path = Memory.ReadString(path_addr);
|
||||
sys_prx.Todo("sys_prx_load_module(path=\"%s\", flags=0x%llx, pOpt=0x%x)", path.c_str(), flags, pOpt.GetAddr());
|
||||
|
||||
|
|
@ -55,9 +52,6 @@ s32 sys_prx_start_module(s32 id, u32 args, u32 argp_addr, mem32_t modres, u64 fl
|
|||
sys_prx.Todo("sys_prx_start_module(id=%d, args=%d, argp_addr=0x%x, modres_addr=0x%x, flags=0x%llx, pOpt=0x%x)",
|
||||
id, args, argp_addr, modres.GetAddr(), flags, pOpt.GetAddr());
|
||||
|
||||
if (!modres.IsGood())
|
||||
return CELL_EINVAL;
|
||||
|
||||
sys_prx_t* prx;
|
||||
if (!Emu.GetIdManager().GetIDData(id, prx))
|
||||
return CELL_ESRCH;
|
||||
|
|
@ -73,9 +67,6 @@ s32 sys_prx_stop_module(s32 id, u32 args, u32 argp_addr, mem32_t modres, u64 fla
|
|||
sys_prx.Todo("sys_prx_stop_module(id=%d, args=%d, argp_addr=0x%x, modres_addr=0x%x, flags=0x%llx, pOpt=0x%x)",
|
||||
id, args, argp_addr, modres.GetAddr(), flags, pOpt.GetAddr());
|
||||
|
||||
if (!modres.IsGood())
|
||||
return CELL_EINVAL;
|
||||
|
||||
sys_prx_t* prx;
|
||||
if (!Emu.GetIdManager().GetIDData(id, prx))
|
||||
return CELL_ESRCH;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue