fix(ampr): validate null command buffer arguments #7625
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7625"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by voidlakhan on 2026-10-18T17:47:37Z.
What
Validate null pointers in
sceAmprAprCommandBufferConstructor,sceAmprCommandBufferConstructor,sceAmprCommandBufferReset, andsceAmprCommandBufferSetBuffer.Previously, passing null pointers to these functions could result in invalid memory access due to dereferencing the pointers. These functions now return
SCE_KERNEL_ERROR_EINVAL(0x80020016) when their required buffer or state arguments are null.Add regression tests to
TestRejectedArguments()inGuestAmpr.cppto verify that invalid arguments are rejected.Tested
ninja -C build-full guest_ampr_tests— passed.ctest --test-dir build-full -R "ampr" --output-on-failure— 3/3 tests passed.python tools/check_conventions.py --base upstream/main— passed.git diff --check upstream/main..HEAD— passed.Checklist
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T18:01:19Z.
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.
core/libs/tests/GuestAmpr.cppcore/libs/prx/libSceAmpr/Export.cppImported from boykopovar/AnyPS5. Originally posted by voidlakhan on 2026-10-18T18:07:25Z.
I reviewed the relevant changes in #6044 and #7332.
GuestAmpr.cppinto thememorydirectory. My PR only adds null-argument regression tests and validation inlibSceAmpr; I have not identified a direct functional overlap.GuestAmpr.cppgates the AMM tests on guest-arena availability, while my change adds assertions inTestRejectedArguments(). These changes affect separate sections of the file.The overlap checker could not complete its comparisons because the referenced PRs conflict with their base branch. GitHub currently reports this PR as mergeable. I have not identified a direct conflict in the changes reviewed.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T15:39:07Z.
Re-checked after the new head: the code is unchanged, the null guards return
SCE_KERNEL_ERROR_EINVALlike the neighbouring exports, the newTestRejectedArgumentscases crash onmain, and the netdocs/dev/debt/libSceAmpr.mdchange is the single "Unknown function info" line recording the unverified null-argument result (existing entries untouched); merged.