Repository navigation
fix(libSceNpUniversalDataSystem): return the module's codes from sceNpUniversalDataSystemInitialize - #16324
Open
sherySJ wants to merge 1 commit into
Open
fix(libSceNpUniversalDataSystem): return the module's codes from sceNpUniversalDataSystemInitialize#16324sherySJ wants to merge 1 commit into
sherySJ wants to merge 1 commit into
Conversation
…pUniversalDataSystemInitialize sceNpUniversalDataSystemInitialize threw std::invalid_argument for a null param and for any size other than 16, which ends the title, and returned 0 for pool_size == 0. A 13.42 module run returns codes for all three. Source: docs/dev/debt/libSceNpUniversalDataSystem.md line 26 and the table in boykopovar#12803 (comment). That table is a run of libSceNpUniversalDataSystem.sprx (13.42, function at 0x1ae0) in a host harness on Windows, not on a console, 3 identical runs: null param returns 0x80553102; size 0, 8, 0xf, 0x11, 0x18, 0x20, 0x100 and ~0 with pool_size 0x10000 return 0x80553112; size 0x10 with pool_size 0 returns 0x80553102; size 0x18 with pool_size 0 returns 0x80553112; size 0x10 with pool_size 0x10000 returns 0. The checks run null, size, pool_size. Initialize now returns those codes in that order. The initialized state (0x80553118 on a repeated call) stays unimplemented and stays in the debt entry, which now states only that gap. The queries test asserts every row of the table that does not need the initialized state. With the old System.cpp it aborts on the first null row with the invalid_argument exception.
Contributor
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 #12803 (comment), 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)