fix(libSceAudioOut): run guest_audio_out_port_bounds with the dummy audio driver #23060

Merged
oneandonlydean merged 1 commit from upstream-pr/23060 into main 2026-11-26 07:34:27 +00:00
oneandonlydean commented 2026-11-18 17:11:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-11-18T17:11:25Z.


What

guest_audio_out_port_bounds opens 32 ports without setting SDL_AUDIODRIVER, so SDL opens real PulseAudio streams. On a host with a PulseAudio server (PipeWire's pipewire-pulse here) and a loaded machine, as in a parallel ctest, the process crashes inside libpulse's mainloop thread (pa_stream_unref) while the main thread is in PULSEAUDIO_OpenDevice. The other AudioOut tests that open ports already set the dummy driver. This sets SDL_AUDIODRIVER=dummy for this test the same way the vibration tests do. The test checks port number bounds and does not depend on a real device. Only the test registration changes.

Tested

Linux, a built guest_audio_out_port_bounds_tests, 12 copies at once, three rounds, against the host's PulseAudio server: 28 passed, 7 SIGSEGV (exit 139) and 1 abort (exit 134) of 36. With SDL_AUDIODRIVER=dummy in the environment: 36 of 36 passed. I did not configure and rebuild to run the changed CMake line through ctest; the reporter in #23020 saw 120 of 120 through ctest with the property set. This does not establish whether the fault is in SDL's PulseAudio backend or in libpulse, so a title that opens many ports on a PipeWire host may still be exposed; that is not addressed here.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and licence notices
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • No new third-party code
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #23020
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5380604557 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23060). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-11-18T17:11:25Z. --- ### What `guest_audio_out_port_bounds` opens 32 ports without setting `SDL_AUDIODRIVER`, so SDL opens real PulseAudio streams. On a host with a PulseAudio server (PipeWire's `pipewire-pulse` here) and a loaded machine, as in a parallel `ctest`, the process crashes inside libpulse's mainloop thread (`pa_stream_unref`) while the main thread is in `PULSEAUDIO_OpenDevice`. The other AudioOut tests that open ports already set the dummy driver. This sets `SDL_AUDIODRIVER=dummy` for this test the same way the vibration tests do. The test checks port number bounds and does not depend on a real device. Only the test registration changes. ### Tested Linux, a built `guest_audio_out_port_bounds_tests`, 12 copies at once, three rounds, against the host's PulseAudio server: 28 passed, 7 SIGSEGV (exit 139) and 1 abort (exit 134) of 36. With `SDL_AUDIODRIVER=dummy` in the environment: 36 of 36 passed. I did not configure and rebuild to run the changed CMake line through `ctest`; the reporter in #23020 saw 120 of 120 through `ctest` with the property set. This does not establish whether the fault is in SDL's PulseAudio backend or in libpulse, so a title that opens many ports on a PipeWire host may still be exposed; that is not addressed here. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt and licence notices - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] No new third-party code - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #23020 - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-18 17:45:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T17:45:17Z.

Review: APPROVED


Reviewed — looks good

The reviewed change sets the SDL dummy audio driver for the port bounds test, whose checks do not require a real audio device.

What I ran

Reviewed head ada5e09213e4489a40af25200d90467c3f83baba. No tests or build commands were run; the reader was used to inspect the changed CMake registration and surrounding lines.

Results

Check Result Note
Diff and changed file passed One CMake test property added
Build and test execution not run Author-reported results are not independent verification

Findings

Blocking

None.

Non-blocking

None.

Not verified

The test was not rebuilt or run on this head. The report's Linux stress results and ctest results were not independently verified. Read description.md, commits.md, manifest.json, diff.patch, and the changed core/libs/prx/libSceAudioOut/CMakeLists.txt (lines 410–440). No changed files were excluded; files.json was unavailable through the reader.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5962042068 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23060#pullrequestreview-5962042068). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T17:45:17Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change sets the SDL dummy audio driver for the port bounds test, whose checks do not require a real audio device. ## What I ran Reviewed head `ada5e09213e4489a40af25200d90467c3f83baba`. No tests or build commands were run; the reader was used to inspect the changed CMake registration and surrounding lines. ## Results | Check | Result | Note | |---|---|---| | Diff and changed file | passed | One CMake test property added | | Build and test execution | not run | Author-reported results are not independent verification | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The test was not rebuilt or run on this head. The report's Linux stress results and `ctest` results were not independently verified. Read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, and the changed `core/libs/prx/libSceAudioOut/CMakeLists.txt` (lines 410–440). No changed files were excluded; `files.json` was unavailable through the reader. ## To get this to a good state Nothing is required.
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!23060
No description provided.