Skip to content

fix(audioout2): guard system-state guest output - #18038

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
DonRyuzaki:fix/audioout2-systemstate-guest-output
Nov 12, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
DonRyuzaki:fix/audioout2-systemstate-guest-output

Conversation

@DonRyuzaki

Copy link
Copy Markdown
Contributor

What

Guard the guest output in sceAudioOut2GetSystemState with GuestCopyOut_nid_no_patch. The function still writes only the loudness float on success, preserves errno, and returns its existing invalid-argument code for null or unwritable output. The console error for an unwritable non-null pointer is unmeasured, so the debt note identifies this as a host-safety fallback. This changes no other AudioOut2 export. Open #17633 and #18015 cover different exports; #14212 may require an ordinary debt-file rebase.

Tested

  • Ubuntu 24.04 WSL2, GCC 13.3, Release, BUILD_TESTING=ON. New test applied to unchanged upstream function crashed as expected at guest pointer 0x10 (CTest exit 8).
  • On tested head 6cdd4de, based on main 53bb992, the full default Linux build passed 3095/3095 Ninja steps. audio_out2_device_state passed three consecutive CTest runs. The full CTest suite was not run.
  • Submitted head 2811349 is based on main 1539313. Its three changed AudioOut2 source, test and debt files have the same Git blob IDs as the tested head. The rebase incorporated changes elsewhere in AGC, other libraries and debt; the full build was not rerun on the submitted head.
  • Windows Python 3.12 conventions check, git diff --check, and clean-tree check passed on the submitted head. Relevant 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; follow-ups go in a new PR
  • No code comments except technical debt
  • Unimplemented paths retain their 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

@JJenkx

JJenkx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 2811349e04, merged onto main 98afc0b8cf (55e7a4f4d5, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • audio_out2_device_state passes in 3 of 3 runs, none skipped.

AI-assisted: yes.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 5021 docs/dev/debt/libSceAudioOut.md
PR 14212 docs/dev/debt/libSceAudioOut.md
PR 17468 docs/dev/debt/libSceAudioOut.md

@gabichuuuuu

Copy link
Copy Markdown
Contributor

Windows check of head 2811349e04, merged onto main f57c971559 (clean merge, built together with other open PRs that touch different files).

Setup: Windows 11 x64, WinLibs GCC 15.2.0 (r7), Ninja, Release, BUILD_TESTING=ON, Python 3.15.

  • Tests built from this PR's test files: audio_out2_device_state.
  • All of them pass in 3 of 3 runs.
  • Negative control: with this PR's code reverted to main (files it adds removed) and rebuilt, audio_out2_device_state fails in 2 of 2 runs, so the tests detect the change.

AI-assisted: yes.

@oneandonlydean
oneandonlydean merged commit 84ad8b8 into boykopovar:main Nov 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants