fix(agc): read buffer V#s over unreadable memory as null #2505

Closed
esatturan wants to merge 1 commit from upstream-pr/2505 into main
esatturan commented 2026-10-09 23:33:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by esatturan on 2026-10-09T23:33:22Z.


Split from #2053 in review.

What

A buffer V# whose base has no readable page, or whose size is over maxStorageBufferRange over memory that is not readable that far, binds the empty placeholder buffer, as null and zero-sized V#s do and as invalid image descriptors read.

  • PPSA29141's shaders declare SRT slots they do not reach on the path taken. Those slots keep unrelated words, such as pointers and terabyte sizes over host memory, and a draw with one threw shader buffer exceeds descriptor range limit.
  • A V# of another type and reserved bits still throw.
  • A sparse heap bound whole whose first page is uncommitted now reads as null too; recorded in TechnicalDebt.

Tested

Windows 11, i7-13650HX, RTX 4070 Laptop, MinGW-w64 GCC 15.2.

  • agc_driver_graphics: two unreachable V#s bind the placeholder; an unmapped V# over the range limit and one outside the user address space are accepted. It fails on main (unreachable V#s did not bind the placeholder buffer).
  • Full ctest on current main (c6e3aa76) merged with this branch, the other LEGO Party! PRs and #1482: 547/547 pass. On Windows, main's libs step currently fails with duplicate patched export name: LibwuIonIBw: #1714 added APS5_EXPORTs for sceVideoOutAddVrrActiveStatusEvent and sceVideoOutAddVrrStatusFlagsPrivilege, whose names the NID table already maps. Those two lines were removed locally for the run.

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
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • 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
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4806979403 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2505). Originally posted by [esatturan](https://github.com/esatturan) on 2026-10-09T23:33:22Z. --- Split from #2053 in review. ### What A buffer V# whose base has no readable page, or whose size is over `maxStorageBufferRange` over memory that is not readable that far, binds the empty placeholder buffer, as null and zero-sized V#s do and as invalid image descriptors read. - PPSA29141's shaders declare SRT slots they do not reach on the path taken. Those slots keep unrelated words, such as pointers and terabyte sizes over host memory, and a draw with one threw `shader buffer exceeds descriptor range limit`. - A V# of another type and reserved bits still throw. - A sparse heap bound whole whose first page is uncommitted now reads as null too; recorded in TechnicalDebt. ### Tested Windows 11, i7-13650HX, RTX 4070 Laptop, MinGW-w64 GCC 15.2. - `agc_driver_graphics`: two unreachable V#s bind the placeholder; an unmapped V# over the range limit and one outside the user address space are accepted. It fails on `main` (`unreachable V#s did not bind the placeholder buffer`). - Full `ctest` on current `main` (`c6e3aa76`) merged with this branch, the other LEGO Party! PRs and #1482: 547/547 pass. On Windows, `main`'s `libs` step currently fails with `duplicate patched export name: LibwuIonIBw`: #1714 added `APS5_EXPORT`s for `sceVideoOutAddVrrActiveStatusEvent` and `sceVideoOutAddVrrStatusFlagsPrivilege`, whose names the NID table already maps. Those two lines were removed locally for the run. ### 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes (Claude Code)
github-actions[bot] commented 2026-10-09 23:36:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T23:36:45Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6091098177 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2505#issuecomment-6091098177). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T23:36:45Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Pull request closed

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!2505
No description provided.