Files
AnyPS5/docs/dev/debt/libSceSysmodule.md
T
mattogepetoandClaude Sonnet 5.5 941fd4e11e Merge remote-tracking branch 'origin/main' into fix/sysmodule-unknown-id-coverage
Keep both sides in GuestSysmodule.cpp (the unknown id check and the Windows
unwind region checks) and in libSceSysmodule.md (Silent stubs and Functional).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 06:55:51 +02:00

1.3 KiB

libSceSysmodule technical debt

Silent stubs

  • sceSysmoduleIsLoaded, sceSysmoduleLoadModule, sceSysmoduleUnloadModule (libSceSysmodule) accept a module id missing from the module table: they log it and return 0 without loading anything, so sceSysmoduleIsLoaded reports an unknown module as loaded and unloading it succeeds, because titles that load or unload such an id aborted otherwise. The internal variants (sceSysmoduleLoadModuleInternal, sceSysmoduleUnloadModuleInternal, sceSysmoduleLoadModuleInternalWithArg, sceSysmoduleGetModuleHandleInternal) throw for an unknown id. What the console returns for an id it does not know is not verified.

Functional

  • sceSysmoduleGetModuleInfoForUnwind (libSceSysmodule) - on Windows the region and file name of an address inside a loaded image are cached after the first lookup, because VirtualQuery on a large image section is slow. An entry is used only while the loader still reports the same image for the address (same base, time stamp and size). A page protection change inside the image after the first lookup, which would split or merge the region VirtualQuery reports, is not noticed. Addresses outside loaded images are queried every time