fix(recompiler): bound cache keys before padded offset arithmetic #6858

Closed
JJenkx wants to merge 6 commits from upstream-pr/6858 into main
JJenkx commented 2026-10-16 14:24:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-16T14:24:10Z.


What

Follow-up to #6296: reject an encoded cache key length before converting it to size_t and calculating its eight-byte padded payload offset. That PR's shared parseEntryHeader currently accepts a 48-byte header declaring keyBytes = UINT64_MAX - 47 when the payload length matches the file length: the offset calculation wraps to zero. Its full-entry readers then receive an invalid key span. Current main has an earlier key/body check; this regression is in the proposed #6296 refactor, not a reproduced game crash on main.

Check the key against both the declared file body and the largest representable padded offset. Keep entry format, valid-entry behavior and shared validation unchanged. Reuse one alignment constant. The regression checks header-only validation, EntryKey and DecodeEntry, plus a header whose reported file length is UINT64_MAX, where checking only key/body fit would still let alignment wrap. No large allocation is needed.

Draft: prerequisite #6296 is closed without merging. This correction depends on its shared cache-entry refactor and does not fix a reproduced defect in current main. The consumer #6032 is also closed. Retain this follow-up for review if that work resumes.

Depends on #6296, exact head 721af439c96abf6d9e061a75cb2e99eb1e8498eb. Its three commits are carried with original authorship, retained in FF merge cdc6802702af01abf326370855f17285771e6c38 including tested main b11c7bf84f5d2f636ff60166cc3371bd071e24d5, with the correction retained. After the dependency merges, retain only the correction. This does not include the archive tool.

Tested

Current-main conflict refresh, 2026-11-09: head 46be77d72af3f8ca82a0913b8bce9d8c6fd564da merges main 7259cce11195f360698772da8c0b3af756bf7c8f. Main's cache format60 and the separate48-byte entry header are retained, along with the original authored changes and overflow bound. The two CPU groups agc_shader_disk_cache and shader_cache_file_read each pass three repetitions on main and this head (6 executions per arm), zero skips. Removing only the key-length bound fails the intended overflowing-header assertion; exact restoration returns6/6 with unchanged source/test hashes.

The technical draft remains: #6296 and #6032 are closed without merging, and the prerequisite helper API is still absent from plain main. This is not evidence of a plain-main bug. No new GPU, Windows, native-title or performance result is claimed. Verified source, CPU/control logs and dependency receipts, SHA-256 29fb15c215067cf7d07795ac534d3290b0ab8c11d2dd01a21dc072435dc814c4; public download and all 26 manifest members verified. The shared main control log contains independent graphics tests that are excluded from this PR's counts.

Current qualification (2026-11-04): FF merge head cdc6802702af01abf326370855f17285771e6c38 includes main b11c7bf84f5d2f636ff60166cc3371bd071e24d5. Original public history/authorship is retained. The sole manual conflict keeps main cache FormatVersion = 56 and independent EntryHeaderBytes = 48; overflow correction is unchanged. Gitlinks and all26 direct dependency clones match prescribed pins.

Linux Release CPU: agc_shader_disk_cache and shader_cache_file_read each pass three repeats on main and candidate (6/6 per arm, zero skips). Removing only the production key-length bound fails at the intended overflowing-header assertion. Exact restore/rebuild passes both groups 6/6, with source/test-binary hashes identical to the initial candidate. Conventions and whitespace pass. No new GPU, Windows, title, full-suite or performance result.

Source/build/log/JUnit/negative/restored proof, SHA-256 18f47d1414336dd3b8a99bce63c7f0b89ed1c1bbaf4f5e44064420e7679e2130; downloaded bytes and all 30 manifest members verified.

Technical draft remains: #6296/#6032 are closed without merging; proposed prerequisite API is absent from plain main. This does not resolve that blocker or demonstrate a plain-main bug.

Historical qualification (2026-11-03): head 71ac9d2b591c16ec6e2d2b51037917f5eb34cac6 on main 4f41f4c375f5abb487dbd184fbc150f31994d762. All four original authored commits are retained. The sole conflict keeps main’s cache FormatVersion = 52 and the independent EntryHeaderBytes = 48; the overflow correction is unchanged.

Linux Release CPU checks: agc_shader_disk_cache and shader_cache_file_read each pass three repetitions on main and change (6/6 per arm, zero skips). Removing only the production key-length bound fails at the overflowing-header assertion. Exact restoration and rebuild returns both groups to 6/6, with all recorded source/test-binary hashes unchanged. Conventions against the batch main and whitespace pass. No new GPU, Windows, title, full-suite or performance measurement.

Source preservation, builds, raw CPU logs/JUnit and negative/restored hashes, SHA-256 69c9b71e3a9520ff7b9b24bc0d0f657946c2ec895320908a5ae2703f63a9a98f; downloaded bytes and all 36 manifest members verified.

Technical draft remains: #6296 and #6032 are still closed without merging, and the proposed prerequisite API is absent from plain main. This resolves the branch conflict without changing that blocker or claiming a reproduced plain-main bug. Earlier qualification below retains its original source pins.

Historical qualification (2026-11-02): head edeb94a73ee3a601266263b83e7004bf14552bf8 on main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8. All four prerequisite/correction commits retain their authorship. The sole conflict preserves main’s cache FormatVersion = 51 alongside the independent EntryHeaderBytes = 48; the overflow correction is unchanged.

Linux Release, GCC 16.2.1, bundled SPIRV-Tools: real agc_shader_disk_cache and shader_cache_file_read CPU groups each ran three times on main and change, 6/6 passes per arm, zero skips. Removing only the new production key-length bound makes the cache group fail at the intended overflowing-key header assertion. Exact production restore/rebuild passes both groups three times again (6/6), and all recorded source/test-binary hashes match the initial candidate. Conventions and whitespace pass. No GPU, Windows, title, full-suite or performance result is claimed.

This remains a technical draft: live #6296 and #6032 are both closed without merging, and the proposed prerequisite API is absent from plain main. This refresh resolves the branch conflict without changing that blocker or claiming a reproduced plain-main defect.

Source preservation, CPU build/logs/JUnit, overflow negative control and restored hashes, SHA-256 0f404018a2efe6397aa0752dab062a4b36eca791675509da87dcc63af40f3053; downloaded bytes and all 33 manifest members verified. Earlier qualification retains its original pins below.

Earlier qualification (2026-11-01): linear head 3219cbc8bffb53efd05828ccb54eb57d93d690fb on main 93dbd0f82aea; original prerequisite/correction authorship retained. Main's cache FormatVersion = 50 and the independent 48-byte entry header are preserved.

Linux x86-64, GCC 16.2.1, Ninja Release, bundled SPIRV-Tools enabled: rebuilt real agc_shader_disk_cache_tests and shader_cache_file_read_tests; both CPU groups pass three repetitions (6 passes, zero skips). Removing only the new key-length bound, rebuilding and retaining the fixtures fails at the intended overflowing-key assertion. Exact production restore and rebuild returns both groups to three passing repetitions. No GPU execution, Windows, title, full-suite or performance measurement.

This remains a technical draft: #6296 and #6032 are closed, and the proposed prerequisite API is absent from plain main. Earlier qualification below is historical and remains pinned to its stated commits.

Current qualification (2026-10-28)

Refreshed with original prerequisite/correction authorship as e86659497c5bea7bac3db2e2e282b46ec14f088b on main 2227f1366188cda5699dd20e2e756a18006a5d4b. Current main's cache FormatVersion = 49 and the independent 48-byte entry header are retained; original topic changes and main gitlinks are preserved.

Linux Release, bundled SPIRV-Tools enabled: both CPU cache/file-read groups pass three repeats on matched main and candidate, 6 passes per arm, with zero skips. Restoring prerequisite-only production while retaining the regression fails at the intended overflowing-header assertion; restoring the qualified production passes both groups again. Conventions and whitespace pass. These are CPU serialization checks and do not execute a GPU.

This remains a technical draft: #6296 is closed without merging, #6032 is closed, and there is no reproduced plain-main defect. No new title, Windows, full-suite or performance result is claimed.

Source pins, reviewed patch/proofs, builds, controls, logs and JUnit, SHA-256 8121941ec57efb5db0479a039c505ec0bcb6613e38d5564cdd92b91474bb7d19.

Main conflict refresh, 2026-10-27 10:18 UTC pass: exact head 28175dd696d813d98b1870c477a0d9fa55ee9c2a on tested main 3fea2a937ba9fbab2f06c51691fe0c5763659aa3. Four authored prerequisite/correction commits are retained. Main's cache format 48 and the separate 48-byte entry-header constant are preserved; no arithmetic workaround is added. This remains a technical draft because #6296 is closed without merging and its proposed refactor is not in main.

Linux Release focused rebuild: With SPIRV-Tools enabled, both CPU cache/file-read groups pass three times on matched main and candidate: 6 passes per arm, zero skips. These tests do not execute a GPU. Conventions, whitespace and merge checks pass. Every refreshed head's submodule pointers match the pinned main; the private dependency checkouts used for the gates are aligned. No new negative-control, Windows, console, title, GPU, full-suite or performance run is claimed. Earlier measurements below retain their original exact pins. Fulfilled merge-order dependencies have been cleared from the checklist; open prerequisites remain.

Exact source/dependency pins, patch-preservation and gitlink proofs, builds, verbose tests, JUnit and lease-push receipts. SHA-256: 702c4110ee9dde421c2dd5e057ed53a2df05e0cf7b01f67e8fb9cb779e332f7c; downloaded copy verified.

Current-main refresh at 6fcbdcd6b472b1edbe10fff93b9aa3593857f7ea on main 3e91c8edf57bdf51671db0063115e38ab2ddc85e: all four commits rebase without conflict and range-diff confirms their patches are unchanged. Main's cache format 44 and the dependency's 48-byte header constant are retained. Release builds of agc_shader_disk_cache_tests and shader_cache_file_read_tests pass with bundled dependencies and SPIRV-Tools. The two CPU cache tests pass 2/2 in 1.64 s on main and 2/2 in 1.61 s on this branch, with no skips, under the same environment. Conventions, whitespace and merge-tree checks against that fetched main pass. GCC reports the existing ShaderCacheDirectory.hpp warning in both builds. This refresh checks the focused targets, not the full libs build or full suite. No Vulkan execution occurs in these CPU tests; setting the validation environment does not establish GPU validation coverage. Earlier baseline/negative-control results below predate this refresh. No native-title or speed claim.

Arch Linux 7.2.9-arch1-1, GCC 16.2.1, Release, bundled dependencies and SPIRV-Tools enabled. Ryzen 9 7950X.

  • Main plus unchanged #6296: agc_shader_disk_cache and shader_cache_file_read pass, 2/2 in 2.07 s.
  • Add the regression without the correction: agc_shader_disk_cache fails immediately with an entry header with an overflowing key length is recognized.
  • Correction: full libs, agc_shader_disk_cache_tests and shader_cache_file_read_tests build; both focused tests pass, 2/2 in 2.08 s. Existing cache round trips, corrupt-file rejection, prebuilt-pack checks, uncached-compilation determinism and untouched disk-cache totals remain covered.
  • python3 tools/check_conventions.py --base origin/main and git diff --check pass.

No native game or GPU execution test, full CTest suite, macOS test or loading/FPS improvement is claimed. This is a cache-file validation correction.

Additional contributor validation: keravyn-ops reports agc_shader_disk_cache passing in 3.79 s at head 1d45d6ba0, on Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release, Radeon 780M (RDNA 3), AMD driver 25.10.20.01. This is a CPU cache test on that machine; no title or GPU execution coverage is established.

Independent contributor validation: DavidAmsellem reports a clean merge onto main dbac9fa15 and full Release builds on AMD Radeon RX 7900 XT / RADV Mesa 25.2.8, Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3. With ANYPS5_REQUIRE_VULKAN=1 ctest -j8, both main and the change passed 1638/1640 tests; the same two failures were agc_driver_image_table_vouched_lookups and agc_driver_guest_memory_lifetime. The shader disk-cache and large-file tests passed, with no tests skipped or removed compared with main. These are attributed contributor results, not a locally repeated full-suite run; they do not change the closed prerequisite or draft status.

Current refresh source proofs and unedited test logs, SHA-256 d812a35317489195225381ef5216fd12f89488704ae06b7879f81b898e5c20a2.

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 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: #6296 (currently closed without merging; this follow-up remains draft)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: none; CPU cache serialization/file-read checks only, Arch Linux
  • AI-assisted: yes

Current rebase patch, focused build/test logs, conventions and range-diff.

Current-main refresh, 2026-10-23

Head 74fda886dd14de26b5b6ad899b4ed2b40b486d5c rebases the same four commits onto main 0db47b263d1019043f7d28fad4e7ee0a1ea5ec6a, preserving the prerequisite author. The only header conflict retains upstream cache format 45 and adds EntryHeaderBytes = 48. The correction itself is unchanged. Main-sync reports 4 ahead / 0 behind, merge clean.

Fresh Linux Release CPU comparison: agc_shader_disk_cache and shader_cache_file_read pass three consecutive runs on main plus unchanged #6296 and on that same integration plus this fix. The baseline-production/candidate-test control fails at the overflowing key-length assertion in three runs. After restoring the corrected source, both tests pass three times again. Source is clean, and conventions and whitespace checks pass. The test environment sets ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; these tests execute CPU cache-format paths and make no GPU execution or title performance claim.

The unresolved prerequisite remains explicit: #6296 is closed and unmerged and #6032 is closed. This remains a technical draft rather than a reproduced fix for plain main.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4889752593 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6858). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-16T14:24:10Z. --- ### What Follow-up to #6296: reject an encoded cache key length before converting it to `size_t` and calculating its eight-byte padded payload offset. That PR's shared `parseEntryHeader` currently accepts a 48-byte header declaring `keyBytes = UINT64_MAX - 47` when the payload length matches the file length: the offset calculation wraps to zero. Its full-entry readers then receive an invalid key span. Current main has an earlier key/body check; this regression is in the proposed #6296 refactor, not a reproduced game crash on main. Check the key against both the declared file body and the largest representable padded offset. Keep entry format, valid-entry behavior and shared validation unchanged. Reuse one alignment constant. The regression checks header-only validation, `EntryKey` and `DecodeEntry`, plus a header whose reported file length is `UINT64_MAX`, where checking only key/body fit would still let alignment wrap. No large allocation is needed. **Draft: prerequisite #6296 is closed without merging.** This correction depends on its shared cache-entry refactor and does not fix a reproduced defect in current main. The consumer #6032 is also closed. Retain this follow-up for review if that work resumes. **Depends on #6296**, exact head `721af439c96abf6d9e061a75cb2e99eb1e8498eb`. Its three commits are carried with original authorship, retained in FF merge `cdc6802702af01abf326370855f17285771e6c38` including tested main `b11c7bf84f5d2f636ff60166cc3371bd071e24d5`, with the correction retained. After the dependency merges, retain only the correction. This does not include the archive tool. ### Tested <!-- codex-maintenance-20261109-cache-bound --> **Current-main conflict refresh, 2026-11-09:** head `46be77d72af3f8ca82a0913b8bce9d8c6fd564da` merges main `7259cce11195f360698772da8c0b3af756bf7c8f`. Main's cache format60 and the separate48-byte entry header are retained, along with the original authored changes and overflow bound. The two CPU groups `agc_shader_disk_cache` and `shader_cache_file_read` each pass three repetitions on main and this head (6 executions per arm), zero skips. Removing only the key-length bound fails the intended overflowing-header assertion; exact restoration returns6/6 with unchanged source/test hashes. The technical draft remains: #6296 and #6032 are closed without merging, and the prerequisite helper API is still absent from plain main. This is not evidence of a plain-main bug. No new GPU, Windows, native-title or performance result is claimed. [Verified source, CPU/control logs and dependency receipts](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr6858-46be77d7-main7259-cache-cpu-linux-20261109.tar.gz), SHA-256 `29fb15c215067cf7d07795ac534d3290b0ab8c11d2dd01a21dc072435dc814c4`; public download and all 26 manifest members verified. The shared main control log contains independent graphics tests that are excluded from this PR's counts. **Current qualification (2026-11-04):** FF merge head `cdc6802702af01abf326370855f17285771e6c38` includes main `b11c7bf84f5d2f636ff60166cc3371bd071e24d5`. Original public history/authorship is retained. The sole manual conflict keeps main cache `FormatVersion = 56` and independent `EntryHeaderBytes = 48`; overflow correction is unchanged. Gitlinks and all26 direct dependency clones match prescribed pins. Linux Release CPU: `agc_shader_disk_cache` and `shader_cache_file_read` each pass three repeats on main and candidate (**6/6 per arm, zero skips**). Removing only the production key-length bound fails at the intended overflowing-header assertion. Exact restore/rebuild passes both groups **6/6**, with source/test-binary hashes identical to the initial candidate. Conventions and whitespace pass. No new GPU, Windows, title, full-suite or performance result. [Source/build/log/JUnit/negative/restored proof](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr6858-cdc68027-mainb11-cpu-linux-20261104.tar.gz), SHA-256 `18f47d1414336dd3b8a99bce63c7f0b89ed1c1bbaf4f5e44064420e7679e2130`; downloaded bytes and all 30 manifest members verified. **Technical draft remains:** #6296/#6032 are closed without merging; proposed prerequisite API is absent from plain main. This does not resolve that blocker or demonstrate a plain-main bug. **Historical qualification (2026-11-03):** head `71ac9d2b591c16ec6e2d2b51037917f5eb34cac6` on main `4f41f4c375f5abb487dbd184fbc150f31994d762`. All four original authored commits are retained. The sole conflict keeps main’s cache `FormatVersion = 52` and the independent `EntryHeaderBytes = 48`; the overflow correction is unchanged. Linux Release CPU checks: `agc_shader_disk_cache` and `shader_cache_file_read` each pass three repetitions on main and change (**6/6 per arm, zero skips**). Removing only the production key-length bound fails at the overflowing-header assertion. Exact restoration and rebuild returns both groups to **6/6**, with all recorded source/test-binary hashes unchanged. Conventions against the batch main and whitespace pass. No new GPU, Windows, title, full-suite or performance measurement. [Source preservation, builds, raw CPU logs/JUnit and negative/restored hashes](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr6858-71ac9d2b-main4f41-cpu-linux-20261103.tar.gz), SHA-256 `69c9b71e3a9520ff7b9b24bc0d0f657946c2ec895320908a5ae2703f63a9a98f`; downloaded bytes and all 36 manifest members verified. **Technical draft remains:** #6296 and #6032 are still closed without merging, and the proposed prerequisite API is absent from plain main. This resolves the branch conflict without changing that blocker or claiming a reproduced plain-main bug. Earlier qualification below retains its original source pins. **Historical qualification (2026-11-02):** head `edeb94a73ee3a601266263b83e7004bf14552bf8` on main `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8`. All four prerequisite/correction commits retain their authorship. The sole conflict preserves main’s cache `FormatVersion = 51` alongside the independent `EntryHeaderBytes = 48`; the overflow correction is unchanged. Linux Release, GCC 16.2.1, bundled SPIRV-Tools: real `agc_shader_disk_cache` and `shader_cache_file_read` CPU groups each ran three times on main and change, **6/6 passes per arm, zero skips**. Removing only the new production key-length bound makes the cache group fail at the intended overflowing-key header assertion. Exact production restore/rebuild passes both groups three times again (**6/6**), and all recorded source/test-binary hashes match the initial candidate. Conventions and whitespace pass. No GPU, Windows, title, full-suite or performance result is claimed. This remains a technical draft: live #6296 and #6032 are both closed without merging, and the proposed prerequisite API is absent from plain main. This refresh resolves the branch conflict without changing that blocker or claiming a reproduced plain-main defect. [Source preservation, CPU build/logs/JUnit, overflow negative control and restored hashes](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr6858-edeb94a7-main-a4eca-cpu-linux-20261102.tar.gz), SHA-256 `0f404018a2efe6397aa0752dab062a4b36eca791675509da87dcc63af40f3053`; downloaded bytes and all 33 manifest members verified. Earlier qualification retains its original pins below. **Earlier qualification (2026-11-01):** linear head `3219cbc8bffb53efd05828ccb54eb57d93d690fb` on main `93dbd0f82aea`; original prerequisite/correction authorship retained. Main's cache `FormatVersion = 50` and the independent 48-byte entry header are preserved. Linux x86-64, GCC 16.2.1, Ninja Release, bundled SPIRV-Tools enabled: rebuilt real `agc_shader_disk_cache_tests` and `shader_cache_file_read_tests`; both CPU groups pass three repetitions (**6 passes, zero skips**). Removing only the new key-length bound, rebuilding and retaining the fixtures fails at the intended overflowing-key assertion. Exact production restore and rebuild returns both groups to three passing repetitions. No GPU execution, Windows, title, full-suite or performance measurement. This remains a technical draft: #6296 and #6032 are closed, and the proposed prerequisite API is absent from plain main. Earlier qualification below is historical and remains pinned to its stated commits. <!-- codex-review-refresh-20261028-repeat-pr6858 --> **Current qualification (2026-10-28)** Refreshed with original prerequisite/correction authorship as `e86659497c5bea7bac3db2e2e282b46ec14f088b` on main `2227f1366188cda5699dd20e2e756a18006a5d4b`. Current main's cache `FormatVersion = 49` and the independent 48-byte entry header are retained; original topic changes and main gitlinks are preserved. Linux Release, bundled SPIRV-Tools enabled: both CPU cache/file-read groups pass three repeats on matched main and candidate, **6 passes per arm**, with zero skips. Restoring prerequisite-only production while retaining the regression fails at the intended overflowing-header assertion; restoring the qualified production passes both groups again. Conventions and whitespace pass. These are CPU serialization checks and do not execute a GPU. This remains a technical draft: #6296 is closed without merging, #6032 is closed, and there is no reproduced plain-main defect. No new title, Windows, full-suite or performance result is claimed. [Source pins, reviewed patch/proofs, builds, controls, logs and JUnit](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr6858-e8665949-main2227-linux-20261028-repeat.tar.gz), SHA-256 `8121941ec57efb5db0479a039c505ec0bcb6613e38d5564cdd92b91474bb7d19`. <!-- codex-main-refresh-20261027-1018-pr6858 --> **Main conflict refresh, 2026-10-27 10:18 UTC pass:** exact head `28175dd696d813d98b1870c477a0d9fa55ee9c2a` on tested main `3fea2a937ba9fbab2f06c51691fe0c5763659aa3`. Four authored prerequisite/correction commits are retained. Main's cache format 48 and the separate 48-byte entry-header constant are preserved; no arithmetic workaround is added. This remains a technical draft because #6296 is closed without merging and its proposed refactor is not in main. Linux Release focused rebuild: With SPIRV-Tools enabled, both CPU cache/file-read groups pass three times on matched main and candidate: 6 passes per arm, zero skips. These tests do not execute a GPU. Conventions, whitespace and merge checks pass. Every refreshed head's submodule pointers match the pinned main; the private dependency checkouts used for the gates are aligned. No new negative-control, Windows, console, title, GPU, full-suite or performance run is claimed. Earlier measurements below retain their original exact pins. Fulfilled merge-order dependencies have been cleared from the checklist; open prerequisites remain. [Exact source/dependency pins, patch-preservation and gitlink proofs, builds, verbose tests, JUnit and lease-push receipts](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-cpu11-main3fea-linux-20261027-1018.tar.gz). SHA-256: `702c4110ee9dde421c2dd5e057ed53a2df05e0cf7b01f67e8fb9cb779e332f7c`; downloaded copy verified. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Current-main refresh at `6fcbdcd6b472b1edbe10fff93b9aa3593857f7ea` on main `3e91c8edf57bdf51671db0063115e38ab2ddc85e`: all four commits rebase without conflict and range-diff confirms their patches are unchanged. Main's cache format **44** and the dependency's 48-byte header constant are retained. Release builds of `agc_shader_disk_cache_tests` and `shader_cache_file_read_tests` pass with bundled dependencies and SPIRV-Tools. The two CPU cache tests pass **2/2 in 1.64 s on main** and **2/2 in 1.61 s on this branch**, with no skips, under the same environment. Conventions, whitespace and merge-tree checks against that fetched main pass. GCC reports the existing `ShaderCacheDirectory.hpp` warning in both builds. This refresh checks the focused targets, not the full `libs` build or full suite. No Vulkan execution occurs in these CPU tests; setting the validation environment does not establish GPU validation coverage. Earlier baseline/negative-control results below predate this refresh. No native-title or speed claim. Arch Linux 7.2.9-arch1-1, GCC 16.2.1, Release, bundled dependencies and SPIRV-Tools enabled. Ryzen 9 7950X. - Main plus unchanged #6296: `agc_shader_disk_cache` and `shader_cache_file_read` pass, 2/2 in 2.07 s. - Add the regression without the correction: `agc_shader_disk_cache` fails immediately with `an entry header with an overflowing key length is recognized`. - Correction: full `libs`, `agc_shader_disk_cache_tests` and `shader_cache_file_read_tests` build; both focused tests pass, 2/2 in 2.08 s. Existing cache round trips, corrupt-file rejection, prebuilt-pack checks, uncached-compilation determinism and untouched disk-cache totals remain covered. - `python3 tools/check_conventions.py --base origin/main` and `git diff --check` pass. No native game or GPU execution test, full CTest suite, macOS test or loading/FPS improvement is claimed. This is a cache-file validation correction. Additional contributor validation: [keravyn-ops reports](https://github.com/boykopovar/AnyPS5/pull/6858#issuecomment-6233039576) `agc_shader_disk_cache` passing in 3.79 s at head `1d45d6ba0`, on Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release, Radeon 780M (RDNA 3), AMD driver 25.10.20.01. This is a CPU cache test on that machine; no title or GPU execution coverage is established. Independent contributor validation: [DavidAmsellem reports](https://github.com/boykopovar/AnyPS5/pull/6858#issuecomment-6273049803) a clean merge onto main `dbac9fa15` and full Release builds on AMD Radeon RX 7900 XT / RADV Mesa 25.2.8, Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3. With `ANYPS5_REQUIRE_VULKAN=1 ctest -j8`, both main and the change passed 1638/1640 tests; the same two failures were `agc_driver_image_table_vouched_lookups` and `agc_driver_guest_memory_lifetime`. The shader disk-cache and large-file tests passed, with no tests skipped or removed compared with main. These are attributed contributor results, not a locally repeated full-suite run; they do not change the closed prerequisite or draft status. [Current refresh source proofs and unedited test logs](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr6858-3219cbc8-rebase-linux-20261101.tar.gz), SHA-256 `d812a35317489195225381ef5216fd12f89488704ae06b7879f81b898e5c20a2`. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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: #6296 (currently closed without merging; this follow-up remains draft) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: none; CPU cache serialization/file-read checks only, Arch Linux - [x] AI-assisted: yes [Current rebase patch, focused build/test logs, conventions and range-diff](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/20261021-pr6858-main3e91-validation.tar.gz). ### Current-main refresh, 2026-10-23 Head `74fda886dd14de26b5b6ad899b4ed2b40b486d5c` rebases the same four commits onto main `0db47b263d1019043f7d28fad4e7ee0a1ea5ec6a`, preserving the prerequisite author. The only header conflict retains upstream cache format **45** and adds `EntryHeaderBytes = 48`. The correction itself is unchanged. Main-sync reports 4 ahead / 0 behind, merge clean. Fresh Linux Release CPU comparison: `agc_shader_disk_cache` and `shader_cache_file_read` pass three consecutive runs on main plus unchanged #6296 and on that same integration plus this fix. The baseline-production/candidate-test control fails at the overflowing key-length assertion in three runs. After restoring the corrected source, both tests pass three times again. Source is clean, and conventions and whitespace checks pass. The test environment sets `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`; these tests execute CPU cache-format paths and make no GPU execution or title performance claim. The unresolved prerequisite remains explicit: #6296 is closed and unmerged and #6032 is closed. This remains a technical draft rather than a reproduced fix for plain main.
keravyn-ops commented 2026-10-17 10:52:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by keravyn-ops on 2026-10-17T10:52:30Z.


AMD / Windows run of this PR at 1d45d6ba0: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release.

Test suite only, no title run. Every ctest entry built from the test targets this PR changes passes (1):

  • agc_shader_disk_cache (3.79 s): shader disk cache tests passed

AI-assisted: yes (runs made on the device above).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233039576 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6858#issuecomment-6233039576). Originally posted by [keravyn-ops](https://github.com/keravyn-ops) on 2026-10-17T10:52:30Z. --- AMD / Windows run of this PR at 1d45d6ba0: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release. Test suite only, no title run. Every ctest entry built from the test targets this PR changes passes (1): - `agc_shader_disk_cache` (3.79 s): `shader disk cache tests passed` AI-assisted: yes (runs made on the device above).
DavidAmsellem commented 2026-10-19 17:22:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T17:22:09Z.


A full-suite run on AMD/Linux (RADV), in case it helps while this is a draft. The change is CPU-side, so this mainly shows nothing else moves. Merged onto main dbac9fa15 (clean merge), built in full and compared with the same main, on the same machine.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8): 1638/1640 with this PR, against 1638/1640 on main. The failures are the same two on both, so this PR adds none: agc_driver_image_table_vouched_lookups (#7766, fixed by #7916) and agc_driver_guest_memory_lifetime (#7784).

agc_shader_disk_cache and agc_shader_disk_cache_large_file pass. The PR adds no new ctest entry, and no test is skipped or removed compared with main.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273049803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6858#issuecomment-6273049803). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-19T17:22:09Z. --- A full-suite run on AMD/Linux (RADV), in case it helps while this is a draft. The change is CPU-side, so this mainly shows nothing else moves. Merged onto `main` `dbac9fa15` (clean merge), built in full and compared with the same `main`, on the same machine. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`): **1638/1640 with this PR, against 1638/1640 on `main`**. The failures are the same two on both, so this PR adds none: `agc_driver_image_table_vouched_lookups` (#7766, fixed by #7916) and `agc_driver_guest_memory_lifetime` (#7784). `agc_shader_disk_cache` and `agc_shader_disk_cache_large_file` pass. The PR adds no new ctest entry, and no test is skipped or removed compared with `main`. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes
JJenkx commented 2026-10-19 17:35:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-19T17:35:37Z.


Thank you for the full-suite comparison and exact machine/base details. I added your attributed result to Tested, including the same two failures on both builds and the cache/large-file passes. This remains draft because #6296 is closed without merging; the comparison does not resolve that prerequisite.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273316285 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6858#issuecomment-6273316285). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-19T17:35:37Z. --- Thank you for the full-suite comparison and exact machine/base details. I added your attributed result to Tested, including the same two failures on both builds and the cache/large-file passes. This remains draft because #6296 is closed without merging; the comparison does not resolve that prerequisite.
DavidAmsellem commented 2026-10-19 18:16:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T18:16:57Z.


First AMD-on-Linux (RADV) run of this PR. Merged onto main dbac9fa15 (clean merge), built in full and compared with the same main, on the same machine.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8) at a45b0eec6: 1638/1640 with this PR, against 1638/1640 on main. The two failures are the same on both, so this PR adds none: agc_driver_image_table_vouched_lookups (#7766, fixed by #7916) and agc_driver_guest_memory_lifetime (#7784).

Comparing the JUnit output with main: this PR adds no ctest entry, and none is skipped or removed.

This checks correctness only; I did not measure performance.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6274107318 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6858#issuecomment-6274107318). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-19T18:16:57Z. --- First AMD-on-Linux (RADV) run of this PR. Merged onto `main` `dbac9fa15` (clean merge), built in full and compared with the same `main`, on the same machine. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`) at `a45b0eec6`: **1638/1640 with this PR**, against 1638/1640 on `main`. The two failures are the same on both, so this PR adds none: `agc_driver_image_table_vouched_lookups` (#7766, fixed by #7916) and `agc_driver_guest_memory_lifetime` (#7784). Comparing the JUnit output with `main`: this PR adds no ctest entry, and none is skipped or removed. This checks correctness only; I did not measure performance. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes

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