Skip to content

fix(libSceAudioOut): safely probe the output in sceAudioOutSysGetHdmiMonitorInfo - #24624

Closed
Sheikh-Bilal65 wants to merge 1 commit into
boykopovar:mainfrom
Sheikh-Bilal65:fix/audioout-sys-hdmi-monitor-info
Closed

Sheikh-Bilal65 wants to merge 1 commit into
boykopovar:mainfrom
Sheikh-Bilal65:fix/audioout-sys-hdmi-monitor-info

Conversation

@Sheikh-Bilal65

Copy link
Copy Markdown
Contributor

What

Safely copy the empty HDMI monitor info record to the guest buffer in sceAudioOutSysGetHdmiMonitorInfo via GuestCopyOut_nid_no_patch while preserving caller errno, returning 0x80260004 (SCE_AUDIO_OUT_ERROR_INVALID_POINTER) on unwritable memory instead of faulting the host.

Tested

tools/check_conventions.py --base origin/main passed. Added test assertion in core/libs/prx/libSceAudioOut/tests/AudioOutSysHdmiMonitorInfo.cpp exercising an unwritable guest pointer and verifying errno preservation. Tested tools/guest_pointer_audit.py libSceAudioOut confirming 0 direct access findings for sceAudioOutSysGetHdmiMonitorInfo.

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 the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: no

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing in the inspected changes blocks merge; the guest copy preserves errno and reports an invalid pointer when the output is unwritable.

What I ran

Reviewed head 2044d0198ccf3692fc3b1277dcad12a2392a912b against the prepared diff. No commands or tests were run; the checks in the PR description are author-reported.

Results

Check Result Note
Code review passed Changed implementation, test, and debt note read
Tests and conventions not run PR description reports checks; not rerun here

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not run the reported convention check, guest pointer audit, or test assertion. No console behavior was measured. Read all three changed files listed in the manifest; no changed files were excluded.

To get this to a good state

Nothing is required.

@kiwe147

kiwe147 commented Nov 20, 2026

Copy link
Copy Markdown

Tested head 2044d0198c, applied with git apply on main fd4aeed483 together with the other sixteen PRs of one batch (#24596, #24594, #24595, #24599, #24600, #24602, #24593, #24659, #24651, #24626, #24625, #24456, #24656, #22380, #24502, #24351). All seventeen applied without conflicts. The tree built except libSceAjm.prx: #24659 breaks it with duplicate patched export name: -qLsfDAywIY (checked alone on main, reported there). No other target failed to build.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
audio_out_sys_hdmi_monitor_info (1 test) all pass outside the iGPU subset

Whole batch: the full ctest -j 12 (6524 tests) on the RTX 3080 has 4 failures, and all 4 also fail on main fd4aeed483 (agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10). The 2125 agc_/video tests on the iGPU fail agc_driver_stencil_plane_memory (also on main), agc_driver_store_over_untracked (also fails alone on main on this iGPU, 6 of 6) and agc_driver_image_table_packed_guards (passes 5 of 5 alone on this tree, known flaky). None of this batch touches AGC.

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@github-actions

github-actions Bot commented Nov 23, 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 18431 core/libs/prx/libSceAudioOut/src/AudioOut.cpp
PR 20630 core/libs/prx/libSceAudioOut/src/AudioOut.cpp
PR 24296 core/libs/prx/libSceAudioOut/src/AudioOut.cpp
PR 27628 core/libs/prx/libSceAudioOut/src/AudioOut.cpp

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for the work. I'm closing this as a duplicate: #20630 is older and makes the same change to sceAudioOutSysGetHdmiMonitorInfo. It still needs its conflict with main resolved; if it stalls, say so and I'll reopen this.

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