fix(libSceSysmodule): reject unsupported module IDs #3716
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3716"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T15:55:40Z.
What
On current
main,sceSysmoduleLoadModulelogs an unknown ID and returns0. Demon’s Souls calls it with module ID0x10b, interprets that as a successful load, and enters the ACM path even though AnyPS5 has no ACM implementation. The publicsceSysmoduleIsLoadedandsceSysmoduleUnloadModulefunctions also silently return success for unknown IDs.Return the defined
SCE_SYSMODULE_ERROR_INVALID_VALUE(0x805A1000) from those three APIs for unsupported IDs. Known modules that have not been loaded still returnSCE_SYSMODULE_ERROR_UNLOADED. Add regression assertions for all three calls with ACM ID0x10b.Closes #3710.
Tested
Linux, GCC 12.2, Release: built
guest_sysmodule_tests;guest_sysmoduleandguest_sysmodule_maps_scanpass (2/2).tools/check_conventions.pyandgit diff --checkpass. The new assertions fail against the previous implementation, where the unknown-ID branches return success.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T18:01:26Z.
Review: CHANGES_REQUESTED
Thanks for tracking this down. Checked:
guest_sysmoduleandguest_sysmodule_maps_scanpass on this PR merged onto currentmain. Points to fix:0x10bis a real module ID (libSceAcm, already in the tree undercore/libs/prx/libSceAcm). #3769 maps it inModuleTable.hpp(reported on Dungeons PPSA16064, Windows test), which is the opposite premise to this PR: with this changeLoadModule(0x10b)fails instead of loading. The Demon's Souls case in #3710 is better solved by the mapping; please coordinate with #3769 and drop the0x10bassertions here.0x805A1000for every unmapped ID is not backed by a source. The only measurement is #3538 (PS5 FW 13.60), which covers id 0 only. Either measure/cite the behaviour for non-zero unmapped IDs or keep the current logged path and record it under "Unknown function info" indocs/dev/TechnicalDebt.md.core/libs/prx/libSceSysmodule/Export.cpp(IsLoaded/LoadModule/UnloadModule) andcore/libs/tests/GuestSysmodule.cpp(constants and top ofmain) overlap #3538; list it under Depends on and rebase after it lands.Welcome to push again with those addressed.
Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-11T20:36:07Z.
Tested locally on Windows with a legal Demon's Souls PPSA01342 v1.04 copy (BuildVersion 2020-12-09.781263), Release, ANYPS5_ENABLE_SPIRV_TOOLS=OFF, based on main
a11c8f7f7. Applied this PR's implementation commit; guest_sysmodule passed (1/1).This change exposes a second required module ID: the title stops at:
Adding #3841's Share registration removes that assertion. With both changes, the title instead remains in audio initialization: submitted serial 1, completed serial 0 after 600 seconds. The original main audio-buffer access violation was not observed in that bounded run, but no main menu was reached. This result is for v1.04; I have not verified the v1.005 report or these PR changes on Linux.
AI-assisted testing and report.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T17:08:21Z.
Closing this as superseded by the maintainer-selected fixes. #3538 is merged and handles the measured module ID 0 case; #3769 is the selected carrier for the real libSceAcm ID 0x10b. The proposed generic error for other unmapped IDs had no supporting console evidence in review, so this PR should not change that behavior.
Pull request closed