fix(audioout2): guard port-state guest output #18044
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18044"
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 DonRyuzaki on 2026-11-10T07:20:49Z.
What
sceAudioOut2PortGetStatepreviously filled a caller output record through raw stores. It now builds the same complete state locally and copies it to guest memory withGuestCopyOut_nid_no_patch. Valid bytes, invalid-handle precedence and null-pointer behavior remain unchanged. An unwritable non-null output returns the existing invalid-argument code without crashing the host or changingerrno. The console result for that pointer remains unmeasured and is recorded as a host-safety fallback.Rebased onto upstream
main2ecc68bda2642fbd5b4c9fb799bc1da4aa3df191. The documentation conflict with merged #16736 was resolved by retaining its AudioOut2 grain-cap note alongside this PR's guest-output safety note. This PR changes the AudioOut2 port-state export, its focused test and its technical debt entry.Tested
BUILD_TESTING=ON: the regression on unchanged upstream code segfaulted at guest output0x10(CTest exit 8). Earlier tested head9508bc0ee99db2cd09ec55a9c426f044b0e41130onmain53bb9927828957e110557a9eb710c7ba954f8732passed the full default Linux runtime build, 3095/3095 Ninja steps;audio_out2_device_statepassed three consecutive focused CTest runs. The full CTest suite was not run.fd0d9fa8edc42917b0e97c70985d2b8a61d49537passes Windows Python 3.12.10tools/check_conventions.py --base origin/main,git diff --check origin/main...HEAD, and clean-tree checks. Static inspection confirms the C++ source and focused test changes remain the same as the original PR patch, and the debt file retains both notes.2ecc68bda2642fbd5b4c9fb799bc1da4aa3df191, the rebasedlibSceAudioOutproduction target andaudio_out2_device_state_testsbuilt under Ubuntu 24.04 WSL2, Release,BUILD_TESTING=ON. The linked library was copied and NID-patched with the project tool.audio_out2_device_stateandpublic_headerseach passed three consecutive CTest runs (6/6 runs, no skips). SHA-256: unpatched4933823f44a05526b6451cb87a76d51ac8cf590eb44586fa9ee4b33793142682; patchedf3cf38bab3de741437b3848eccba0b0adfa08ac42d63dc58d8ea34705de33c3a. The full CTest suite was not run.Checklist
main; no other open PR implements this AudioOut2 exportNotImplemented_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)