Repository navigation
test(libSceUserService): audit login user list parameter validation and boundary limits - #17478
Conversation
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Vulkan hidden for this CPU-only run. The The PR does not build on Windows (MinGW GCC 15.2): I've only quoted the output here and haven't traced the cause. AI-assisted: yes. |
gabichuuuuu
left a comment
There was a problem hiding this comment.
Windows run of head 26d501540c, merged onto main 095ff72367 in one tree with other open PRs that touch different files (each PR's test is its own file, so they don't interact). Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release, BUILD_TESTING=ON.
guest_user_service_login_bounds_testsdoes not compile on Windows:'USER_SERVICE_ERROR_INVALID_POINTER' was not declared in this scope; did you mean 'USER_SERVICE_ERROR_INVALID_ARGUMENT'?. CI's Windows job builds the guest tests too, so this would fail there.
|
@slopgobblercobbler, this does not build and adds a whole test target for a single check. The title mentions partially filled lists, buffer boundaries and invalid user ids, but the only assertion is sceUserServiceGetLoginUserIdList(nullptr), and it expects USER_SERVICE_ERROR_INVALID_POINTER, which is not defined anywhere (JJenkx and gabichuuuuu both get the undeclared identifier error on Windows). The implementation in Export.cpp returns USER_SERVICE_ERROR_INVALID_ARGUMENT for a null pointer. core/libs/tests/GuestUserServiceLifecycle.cpp already covers the not initialized error, the OK case and the invalid entries. Could you drop the new file and the CMake block, and if you want the null pointer case, add one line to GuestUserServiceLifecycle.cpp after init that checks for USER_SERVICE_ERROR_INVALID_ARGUMENT? |
26d5015 to
af16d03
Compare
|
Thanks @oneandonlydean for the guidance! Updated:
|
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The null-pointer assertion matches the existing login-list validation behavior and is placed after service initialization.
What I ran
Reviewed head af16d03b7cf0f5a309fb67bae2a4cff1b7fbae94. I inspected the prepared diff, the changed test context, and repository search results. I did not run tests or the author-reported conventions check.
Results
| Check | Result | Note |
|---|---|---|
| Diff and test context | passed | Assertion checks initialized service behavior |
| Automated checks | not run | Conventions check reported by author only |
Findings
Blocking
None.
Non-blocking
None.
Not verified
No test suite or conventions check was run during this review. GuestUserServiceLifecycle.cpp was read; files.json was not available in the prepared bundle, so excluded files could not be confirmed. The manifest lists one changed file, and its full text was included.
To get this to a good state
Nothing is required.
|
Closing because main already checks this: |
What
sceUserServiceGetLoginUserIdListparameter validation by adding a null-pointer assertion (sceUserServiceGetLoginUserIdList(nullptr) == USER_SERVICE_ERROR_INVALID_ARGUMENT) directly toGuestUserServiceLifecycle.cppafter initialization, resolving maintainer review feedback.Tested
python tools/check_conventions.py --base upstream/main --head HEADpassed with 0 findings.GuestUserServiceLifecycle.cppunit test assertions.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)