Repository navigation
DirectStorage: validate request sizes and bounds before buffer allocation (#1392) - #1438
hajduzsolt wants to merge 1 commit into
Conversation
|
Independent downstream observation on Windows / RX 7900 XT. A cold-cache build based on main 9e3831e with #789 and #1514 streamed title assets after account selection, then exited 0xc0000409 under a 28 GiB Windows job limit. Peak sampled process commit was 28,088 MB. A stack scan on the terminating thread with the matching XCL PDB found the Rust OOM handler, miniz_oxide inflate, and the DirectStorage queue worker. The exact request and requested allocation size are unknown. Your source-buffer checks apply cleanly to that build. There is a separate allocation in the zlib output path: decompress_to_vec_zlib_with_limit bounds length but allocates the output infallibly. I tested a local fallible-output variant with valid zlib data, exact and unspecified intermediate lengths, zero padding, checksum failure, and an injected allocation refusal during buffer growth. The focused fixture passed and the refusal returned E_OUTOFMEMORY. Hardware validation of the combined changes is pending. Hardware follow-up on the same RX 7900 XT, cold application cache, 28 GiB job limit. With the source checks plus fallible zlib output, the release built and all 19 downstream DirectStorage tests passed. Run 91 selected Player1 at 49 s. In the 60–150 s samples, XCL counted 88,084 attempted requests and 109 failures. Destination tracing found requests with options 0x200001 (file/zlib to physical pages) still carrying a zero page number when the worker tried to write. The last positive present sample ended at 174.217 s. The final captured frame was dark. Process exit was again 0xc0000409 and peak sampled process commit was 28,566 MB. This time the matching-PDB stack scan showed the allocator failure in Chain::detile_level, title_textures::subresources and a subresources_on worker. This run did not establish that the zlib allocator itself encountered pressure, and changing it did not eliminate process-level memory exhaustion. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
There was a problem hiding this comment.
The newer smoke blocks and test results are useful, but the description still contains an earlier duplicated Tested/Regression section with a literal \text placeholder and a pending-human-verification note. It reports different counts and empty smoke blocks, which conflicts with the later complete results and makes the current evidence ambiguous. Could you remove the stale section and leave one canonical Tested/Regression report? AI-assisted review; I checked both sections in the current description.
|
Thanks for flagging the duplicate section. The earlier Tested/Regression text and pending placeholder are stale; the later Tested/Regression sections contain the newer results. I have left the smoke-containing description intact for the automated verifier, so the duplicate still needs cleanup there. |
|
Thanks for flagging this. I removed the stale duplicate section and preserved both existing smoke blocks verbatim. |
8bfe682 to
370246c
Compare
|
Tested Tested
base: PR:
The new test passes without the fix. Applied alone (only the test hunk) onto Not tested
Written by Claude Code (Claude Opus 5.5) from runs on this machine; checked before posting. |
|
Two contributors checked independently and found that #1381 #1785 solves the same problem (for #1392) in a different way: #1607, group D54. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
|
CPU-only DirectStorage error-path verification on exact head Tested
Not tested AI use: Codex (GPT-6; exact variant unavailable) wrote the test and temporary controls, ran CPU verification and prepared this report. |
Runtime fix verified with unit tests and RX 9070 XT smoke run.
What is in it
Tested
cargo test --workspace -- --test-threads=4passed.Regression run
main:
PR:
Not tested
XCL_NETWORK=0) and NVIDIA / wave32-only GPUs.AI use