Repository navigation
fix(libSceAgcDriver): safely probe the output pointer in sceAgcDriverGetCoredumpMode - #20406
Conversation
…GetCoredumpMode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I independently reproduced and verified this at head Machine: Windows 10.0.26200, NVIDIA GeForce RTX 5080, NVIDIA 621.14, Vulkan validation 1.4.363. I first applied only the PR's
The negative control fails as expected: I then applied the PR's |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the review supports merging, and the reported targeted test and convention check were not run in this review.
What I ran
Reviewed head 38dff7a9ada9155be04d202381a7e60d73df9cd0 against the prepared diff. Read the complete changed files in files/ and the guest copy helper implementation. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code | passed | Three changed files read |
| Targeted test | not run | Result supplied in PR description |
| Convention check | not run | Result supplied in PR description |
Findings
Blocking
None.
Non-blocking
None.
Not verified
Physical console behavior for unmapped pointers is explicitly unmeasured. No build, test, or convention check was run here. Read: core/libs/prx/libSceAgcDriver/Unimplemented.cpp, core/libs/tests/GuestAgcDriverDebugUnavailable.cpp, docs/dev/debt/changes/fix-agcdriver-probe-coredump-mode.md, and core/libs/prx/libc/src/General.cpp (lines 850–885). All three files listed as reviewed in the manifest were read; files.json was not present in the review folder listing.
To get this to a good state
Nothing is required.
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
|
Thanks @kiwe147 for including this one in the batch. The |
malekaifa
left a comment
There was a problem hiding this comment.
Reviewed exact head 38dff7a9ada9155be04d202381a7e60d73df9cd0. The change replaces the unsafe direct guest write with GuestCopyOut_nid_no_patch, preserves caller errno, keeps the existing null/error result, and adds an unmapped-output regression. Current main still contains the direct *mode = 0 write, and the repository already uses the same saved-errno guest-copy pattern in other output paths. I found no blocking issue in the three-file patch. I did not independently rerun the reported Linux/Windows tests in this review. AI-assisted: yes
What
sceAgcDriverGetCoredumpModestored the mode with*mode = 0, so a non-null pointer to unmapped memory faulted the host. It now writes throughGuestCopyOut_nid_no_patchand returns0x8A6D0003(DRIVER_NULL_OUTPUT, its existing null-pointer error) when the write fails, witherrnoleft as the caller had it. The reported mode is still always 0.The debt entry records the unmapped-memory result as a host-safety fallback; what the console does there is not measured.
Tested
Linux (Ubuntu 26.04.1), GCC 15.2, Release.
guest_agc_driver_debug_unavailablegains a case: the unmapped pointer0x10returns0x8A6D0003and leaveserrnounchanged; the null and valid-pointer cases still pass.ctest -R '^guest_agc_driver_debug_unavailable$': passes. No GPU is used by this test or this path.tools/check_conventions.pypasses on the branch and this body.38dff7a9ad, applied with other PRs ontomainfd4aeed483(one combined tree, not this PR alone), Windows 11, WinLibs GCC 15.2.0 r7, Release, no validation layer:guest_agc_driver_debug_unavailablepass on an NVIDIA GeForce RTX 3080 (driver 621.24).Checklist
main; no other open PR implements the same functionsNotImplemented_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)