fix(audioout2): guard queue-level guest outputs #18040

Merged
DonRyuzaki merged 2 commits from upstream-pr/18040 into main 2026-11-13 00:37:40 +00:00
DonRyuzaki commented 2026-11-10 07:18:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DonRyuzaki on 2026-11-10T07:18:42Z.


What

Use guarded guest copies for both optional output pointers of sceAudioOut2ContextGetQueueLevel, including the path used by the low-level wrapper. Valid callers still receive the same queue depth values. An unwritable non-null output now returns the existing invalid-argument code and preserves host errno. Poll counters advance only after both requested copies succeed. The console error for an unwritable output is unmeasured and is recorded as a host-safety fallback. Open #14997 changes ContextCreate and #12863 changes a context callback; our #18039 changes a different output in the same source file, so a later documentation rebase may be needed.

Tested

  • Ubuntu 24.04 WSL2, GCC 13.3, Release, BUILD_TESTING=ON. The new regression on unchanged upstream code segfaulted at guest address 0x10 (CTest exit 8).
  • Tested head 73fade12a894ec8f4963a3599982ff074376cff2 on main 53bb992782 passed the full default Linux runtime build, 3095/3095 Ninja steps. audio_out2_context_handles passed three consecutive focused CTest runs. The full suite was not run.
  • Submitted head 925a544a26 on reviewed main 1539313883 has byte-identical changed AudioOut2 source, test and debt files to the tested head. Its rebase incorporated unrelated AGC, library and debt changes; the full build was not repeated on the submitted head.
  • Windows Python 3.12 conventions, git diff --check and clean-tree checks passed on the submitted head. Open PR patches and discussion were compared manually because gh was unavailable for pr_overlap.py. No game or GPU test.

Checklist

  • Based on reviewed main; no open PR implements this export
  • One topic per PR
  • No code comments except technical debt
  • Unimplemented paths keep existing handling; silent stubs are documented
  • No notes or images added to the repository
  • No new third-party code
  • Generic behavior, not title-specific
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5237404313 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18040). Originally posted by [DonRyuzaki](https://github.com/DonRyuzaki) on 2026-11-10T07:18:42Z. --- ### What Use guarded guest copies for both optional output pointers of sceAudioOut2ContextGetQueueLevel, including the path used by the low-level wrapper. Valid callers still receive the same queue depth values. An unwritable non-null output now returns the existing invalid-argument code and preserves host errno. Poll counters advance only after both requested copies succeed. The console error for an unwritable output is unmeasured and is recorded as a host-safety fallback. Open #14997 changes ContextCreate and #12863 changes a context callback; our #18039 changes a different output in the same source file, so a later documentation rebase may be needed. ### Tested - Ubuntu 24.04 WSL2, GCC 13.3, Release, BUILD_TESTING=ON. The new regression on unchanged upstream code segfaulted at guest address 0x10 (CTest exit 8). - Tested head 73fade12a894ec8f4963a3599982ff074376cff2 on main 53bb9927828957e110557a9eb710c7ba954f8732 passed the full default Linux runtime build, 3095/3095 Ninja steps. audio_out2_context_handles passed three consecutive focused CTest runs. The full suite was not run. - Submitted head 925a544a26a3e7f106be71602265be3b9265e928 on reviewed main 153931388353c2f424c2894e90f8b451c56b5833 has byte-identical changed AudioOut2 source, test and debt files to the tested head. Its rebase incorporated unrelated AGC, library and debt changes; the full build was not repeated on the submitted head. - Windows Python 3.12 conventions, git diff --check and clean-tree checks passed on the submitted head. Open PR patches and discussion were compared manually because gh was unavailable for pr_overlap.py. No game or GPU test. ### Checklist - [x] Based on reviewed main; no open PR implements this export - [x] One topic per PR - [x] No code comments except technical debt - [x] Unimplemented paths keep existing handling; silent stubs are documented - [x] No notes or images added to the repository - [x] No new third-party code - [x] Generic behavior, not title-specific - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18040
No description provided.