agc_driver_sampled_cache_budget divides by zero when fixture registrations are contiguous #4141
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Amoenus on 2026-10-11T23:57:28Z.
Resolved upstream
#4159 by MarcZX100 merged2026-10-12, commit
34a16b7f, implementing the guard gap and nonzero-charge assertion; this issue is closed as completed. The independent Windows counterexample/validation below remains useful historical evidence. No additional PR is proposed.Failure
agc_driver_sampled_cache_budgetcan divide by zero inviewEvictionTestswhen its two fixture allocations are contiguous. First observed in a full Windowsctest -j4 --timeout 30run:NUMERICAL, exception0xc0000094. The dump hasrax=0x100000,rcx=0; the faulting executable instruction divides the 1 MiB budget byTextureCacheUsage().sampledBytes.The current test assumes
snapshotsremains outside the import made forimported. continuesRun/importRun intentionally joins contiguous registrations with matching permissions. If the two 3 MiB blocks touch, both sampled textures can therefore be storage-image views, charged at zero bytes.Reproduction and controls
Windows 11 Enterprise 26200, WinLibs GCC 15.2/UCRT/POSIX/SEH r7, Release/testing ON, RTX 5080. Vulkan required, shader cache disabled.
snapshotsandimported. Keep the original division and checks. Diagnostic output confirms block distance 3,145,728 bytes,charged=0,storageView=1; 5/5 divide-by-zero exits on each of two local integrations, before and after an unrelated resident-MSAA readback change.storageView=0for the snapshot, nonzero charged bytes, 5/5 complete test passes against each library set.These are native-library controls on pinned-main
a672688eintegrations406838ac7and3d5c594c3, not whole-current-main validation. The test file is byte-for-byte the same Git blob as current mainbca7a29d:0cf28122db6fc3a9549cde83a1011b30d3da1c5f. Original failure, counterexample sources, hashes and logs are retained outside the repository.Validated local correction (2026-10-12)
Integration commitcfc9b0411 reserves
BlockBytes + 65536uusing both existing allocator paths, registers onlyBlockBytes, and requires a nonzero snapshot charge before division. The snapshot/imported registrations therefore cannot touch. No production importer or library source changes.Windows RTX5080/WinLibs15.2 Release, Vulkan required/cache off: full build/libs/registration/conventions pass; all244 patched/unpatched library files byte-identical before/after this test-only change. The registered test passes 50/50 serial runs (~1.4s each). External controls using the corrected test source: forced contiguous registrations reject5/5 with the new descriptive assertion; removing that assertion reproduces the original arithmetic exception5/5; the same fixture with the unregistered64KiB gap passes5/5 with a nonzero charged snapshot and
storageView=0.Combined with the independently validated merged AMM placement fix, the full870-test integration suite is 865pass/0fail/5 explicit skips, maximum15.57s. These are integration tests, not unchanged-current-main validation; Linux's allocator change has not been run here. No gameplay claim.
Historical one-file preparation
d32ceb3c6, basebca7a29d, remains local and is not an additional candidate now that the equivalent correction is merged. The tested integration file is available through the linked fork commit; the fresh088 full suite is867pass/0fail/5skip of872, not unchanged-current-main validation.Fixture correction now merged
The merged correction reserves an extra unregistered64KiB on both allocator paths and asserts a nonzero snapshot charge before division. The independent forced-contiguous/gap controls above validate the fixture distinction; they do not claim new production-importer behavior.
AI-assisted investigation/report: Codex. No PR or game-startup claim.