Repository navigation
fix(libSceMusicCoreInterface): return error on unreadable parameter preserving errno - #24426
vishnuvardhan3333 wants to merge 1 commit into
Conversation
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against dbb16f7cc8:
- Conventions:
tools/check_conventions.pypassed. - Build:
guest_music_core_interface_testsbuilt cleanly. - CTest (
guest_music_core_interface):1/1 Test #4677: guest_music_core_interface ....... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 - Negative control: with
core/libs/prx/libSceMusicCoreInterface/Export.cppreverted tomainand the new tests kept, the suite fails:Restoring the change makes it pass again.1/1 Test #4677: guest_music_core_interface .......Subprocess aborted***Exception: 0.40 sec 0% tests passed, 1 tests failed out of 1 - Code reading:
- Verified Export.cpp null-pointer checks for argument1 and param before attempting GuestCopyIn_nid_no_patch
- Verified errno preservation around GuestCopyIn_nid_no_patch in sceMusicCoreIfInitializeInterface
- Verified error return ErrorInvalidArgument (0x81795002) when GuestCopyIn_nid_no_patch fails or size != InterfaceParamSize
- Verified docs/dev/debt/changes/fix-music-core-interface-guest-param.md conforms to debt fragment specifications
- Verified GuestMusicCoreInterface.cpp test coverage for unreadable parameter handling and errno preservation using GuestArenaSetHostReadHook_nid_no_patch
Looks Good To Me
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The changed implementation and regression test are sound by inspection; I could not run the reported checks in this review environment.
What I ran
Reviewed head dbb16f7cc81d7a425c0657d35676c231d331d3f2. Read the prepared description, commits, manifest, diff, and all three changed files through the review reader. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Code and test review | passed | All changed files read |
| Reported convention and debt checks | not run | Author-reported only |
| Regression test execution | not run | No command execution available |
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The convention and debt checks reported in the PR description were not run here. No files were excluded from review; all three files marked changed in the manifest were read.
To get this to a good state
Nothing is required.
|
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) |
|
Windows CPU run with two points. Existing runs:
What this run adds.
Code (line numbers at
Negative control and mutation. All of these ran on
Tests.
Host
AI-assisted: yes |
|
Thanks @Helldiverr for the Windows run and analysis! Since GuestCopyIn_nid_no_patch already preserves errno on main and returning |
What
In
libSceMusicCoreInterface:errnoaroundGuestCopyIn_nid_no_patchinsceMusicCoreIfInitializeInterface.ErrorInvalidArgument(0x81795002) instead of throwingstd::invalid_argumentwhen the guest parameter buffer is unreadable.core/libs/tests/GuestMusicCoreInterface.cppensuring an unreadable parameter returnsinvalidArgumentand preserves callererrno.docs/dev/debt/changes/fix-music-core-interface-guest-param.md.Tested
python tools/check_conventions.py --base origin/main(passed)python tools/debt_fold.py --check(passed)python tools/pr_overlap.py --names sceMusicCoreIfInitializeInterface sceMusicCoreIfSetFunctionTable sceMusicCoreIfMainLoop sceMusicCoreIfSetInternalFunctionTable sceMusicCoreIfSetFunctionTableExt2 sceMusicCoreIfSetFunctionTableUnlimited sceMusicCoreIfInternalInitializeInterface(none)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)