fix(libSceNpUniversalDataSystem): return the module's codes from sceNpUniversalDataSystemInitialize #16324
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16324"
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 sherySJ on 2026-11-06T08:34:00Z.
What
sceNpUniversalDataSystemInitialize(core/libs/prx/libSceNpUniversalDataSystem/src/System.cpp:12) threwstd::invalid_argumentfor a nullparamand for anysize != 16, which ends the title, and returned 0 forpool_size == 0. The native module returns a code in all three cases.Source:
docs/dev/debt/libSceNpUniversalDataSystem.md:26and the table in https://github.com/boykopovar/AnyPS5/pull/12803#issuecomment-6517047831, which @BunnyFl posted (thank you). It is a run of the 13.42libSceNpUniversalDataSystem.sprx(function at 0x1ae0) in a host harness on Windows, not on a console, three identical runs. The module's own start routine failed in the harness and two setup steps were run by hand, so only the error returns come from the module.param == NULL0x80553102size0, 8, 0xf, 0x11, 0x18, 0x20, 0x100,~0(pool_size0x10000)0x80553112size0x10,pool_size00x80553102size0x18,pool_size00x80553112size0x10,pool_size0x100000The checks run null, then
size, thenpool_size. The function now returns these codes in that order (NpUniversalDataSystem.hppgetsSCE_NP_UNIVERSAL_DATA_SYSTEM_ERROR_INVALID_PARAM_SIZE = 0x80553112). The queries test asserts every row above. The initialized state (0x80553118on a repeated call) stays unimplemented and is the only thing left in the debt entry at line 26, with the #12803 comment as its source.Tested
cmake --build build --target guest_np_uds_queries_tests,ctest -R '^guest_np_uds_queries$'run three times on the head: Passed each time.System.cppwith this test aborts (terminate called after throwing an instance of 'std::invalid_argument',what(): sceNpUniversalDataSystemInitialize: invalid argument) on the first row, the null param. On main the wrong-size rows also throw and thepool_size0 row returns 0. The head passes.python3 tools/check_conventions.py --base origin/main: passed.guest_np_uds_queries3 of 3 passing on Windows 11 with GCC 15.2 UCRT (comment). The values come from a module run, not a console.Overlap
Base
e509b29247. Open PRs touchingdocs/dev/debt/libSceNpUniversalDataSystem.mdelsewhere: #14912, #13606, #14212 (draft), #14330.git merge-treeof this head with #14912, #13606 and #14330 is clean; #14212 already conflicts withmainintools/debt_split.pyand not in these files. No open PR touchesSystem.cpporGuestNpUniversalDataSystemQueries.cpp.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-09T08:52:27Z.
Review: COMMENTED
Windows run of head
f68e23b4d7, merged ontomain286b14d2f7in one tree with 47 other small open PRs that touch different files. Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release,BUILD_TESTING=ON.guest_np_uds_querieswith--repeat until-fail:5: 5 / 5 pass.main'sNpUniversalDataSystem.hpp,System.cppand this PR's test: 5 / 5 runs fail.