fix(libSceVoice): write only the four SDK fields of sceVoiceGetResourceInfo #8688
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8688"
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 JAB-dev on 2026-10-20T21:06:36Z.
sceVoiceGetResourceInfowrote ten bytes into a structure that is eight bytes in the SDK, so a title that passes its ownSceVoiceResourceInfohad the two bytes after it overwritten. It now writes exactly the four SDK fields and nothing else.What
SceVoiceResourceInfohas four 16-bit fields (voice input ports, voice output ports, device input ports, device output ports), 8 bytes in total, as the PS5 SDK definesSceVoiceResourceInfo(voice_types.h). The repo'sVoiceResourceInfohad a fifth 16-bit field,max_ports, written as 64 at offset 8. The field and the write are removed; the four values written are unchanged (their numbers are still Vita-derived, as the debt entry says). The debt entry forsceVoiceGetResourceInfodrops the "64 total ports" limit and the claim that the layout is assumed.Firmware
libSceVoice.sprx, PS5 3.20 (function at 0x14570) and 4.03 (0x14820): the function returns 0x804E0801 for an uninitialized library, 0x804E0805 for a null pointer, otherwise sends one command to the voice service; the module itself has no fifth field to fill. Read from the disassembly, not measured on a console. No firmware bytes are in the repository.Tested
Windows 11 x64, Release build, MinGW GCC 15.2.0 (WinLibs r7),
-DBUILD_TESTING=ON, onmain9d5099f5e. Linux not tested.guest_voice: a wrapper struct holds a realVoiceResourceInfofollowed by two guard bytes set to 0xA5; the test asserts the guard sits at offset 8, callssceVoiceGetResourceInfoon the embedded structure, expects 0, the four values 7, 7, 1, 1, and both guard bytes still 0xA5. The oldmax_ports == 64assertion is removed.Export.cppandSceTypes.hppfrommain,guest_voiceaborts at the offset check (exit code 0xc0000409), because main's structure is 10 bytes (the source writes a fifthuint16_tat offset 8); that run does not reach the guard check. As a separate negative control, with this branch's 8-byte header andExport.cpptemporarily writing one extrauint16_tat offset 8, the offset check passes and the test aborts at the guard check; the change was then removed.python tools/check_conventions.py --base origin/mainpasses andgit diff --checkis clean.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T21:20:54Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/SceTypes.hppcore/libs/tests/GuestVoice.cppcore/libs/prx/libSceVoice/Export.cppcore/libs/tests/GuestVoice.cppcore/libs/SceTypes.hppcore/libs/SceTypes.hppcore/libs/SceTypes.hppcore/libs/SceTypes.hppcore/libs/prx/libSceVoice/Export.cppcore/libs/tests/GuestVoice.cppdocs/dev/debt/libSceVoice.mdcore/libs/prx/libSceVoice/Export.cppcore/libs/tests/GuestVoice.cppdocs/dev/debt/libSceVoice.mdImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T01:07:24Z.
Review: APPROVED
Reviewed the diff against current main. The existing 10-byte VoiceResourceInfo and write at offset 8 do overwrite bytes beyond the SDK's four-field, 8-byte PS5 structure. This change removes that write, updates the shared type and debt entry, and adds a guard-byte test that exercises the public export. The reported Windows positive and negative controls are relevant. Current hosted checks pass for eligibility, conventions, intake, labels, and report; platform build jobs are skipped, so I could not independently reproduce the Windows run in this Linux workspace (no existing guest_voice binary, and disk space is nearly exhausted). No blocking code issue found.
Imported from boykopovar/AnyPS5. Originally posted by Filip722 on 2026-10-21T09:33:38Z.
Linux validation of exact PR head
e407e32a353a509a15b83b6da3b6c8228e3d86ca:guest_voiceandguest_voice_port_attreach passed three consecutive executions (6 successful executions, no failures or skips).Environment: Debian 13.7 x86-64, Linux
7.2.9-x64v3-xanmod1, AMD Ryzen 5 7640HS, GCC 15.2.0, CMake 3.31.6. Full Release configuration withBUILD_TESTING=ON,ANYPS5_RELINKER_ONLY=OFF, bundled dependencies; builtlibSceVoice, both test targets and their dependencies with two jobs.7, 7, 1, 1, and preserves both0xA5guard bytes.Export.cpp) with its originalSceTypes.hppfrom9d5099f5e76208ff39d2b3bd70c9d96223c5e353into a separate temporary library, using the same compiler options and PR-built kernel/libc dependencies. Loading that library throughLD_LIBRARY_PATHmakes the same PR test executable, still compiled with the eight-byte structure, abort withSIGABRT. The parent header was used only to build the old library, so this control does not fail by compiling the caller with the parent's ten-byte structure.Tracked source files remained unchanged. This is Linux runtime and regression evidence; no new Windows run, PS5 measurement, title, GPU, or full repository test-suite validation was performed. The documented uncertainty in the resource-limit values remains.
AI-assisted testing and report.
Pull request closed