DirectStorage: validate request sizes and bounds before buffer allocation (#1392) #1428

Open
hajduzsolt wants to merge 2 commits from upstream-pr/1438 into main
hajduzsolt commented 2026-11-24 15:58:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T15:58:04Z.


Runtime fix verified with unit tests and RX 9070 XT smoke run.

What is in it

  • Validate DirectStorage source and destination bounds before allocating request buffers, and use fallible allocation for the source buffer.
  • Add synthetic coverage for oversized and out-of-bounds requests. Fixes #1392.

Tested

  • Windows 11 Pro x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT 16 GB, Rust MSVC: cargo test --workspace -- --test-threads=4 passed.

Regression run

main:

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: AMD Radeon RX 9070 XT
title: b0ea61d5
seconds: 60
exit: 0x0
frames shown: 1676 (PresentX 1676)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14579 MB

PR:

xcl-smoke v1
commit: 81e9b6214a724520a454c6598a3b9b5b5e0eed03
gpu: AMD Radeon RX 9070 XT
title: b0ea61d5
seconds: 60
exit: 0x0
frames shown: 1671 (PresentX 1671)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14838 MB

Not tested

  • In-game world gameplay beyond the 60-second startup/menu smoke run (XCL_NETWORK=0) and NVIDIA / wave32-only GPUs.

AI use

  • Codex (GPT 6.1 Terra Medium): AI-assisted implementation and synthetic unit tests; verified with workspace unit tests and local RX 9070 XT smoke run.
<!-- greyfinch-sync:ivall/xcl:issue:5475678282 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T15:58:04Z. --- Runtime fix verified with unit tests and RX 9070 XT smoke run. **What is in it** - Validate DirectStorage source and destination bounds before allocating request buffers, and use fallible allocation for the source buffer. - Add synthetic coverage for oversized and out-of-bounds requests. Fixes #1392. **Tested** - Windows 11 Pro x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT 16 GB, Rust MSVC: `cargo test --workspace -- --test-threads=4` passed. **Regression run** main: ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: AMD Radeon RX 9070 XT title: b0ea61d5 seconds: 60 exit: 0x0 frames shown: 1676 (PresentX 1676) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14579 MB ``` PR: ``` xcl-smoke v1 commit: 81e9b6214a724520a454c6598a3b9b5b5e0eed03 gpu: AMD Radeon RX 9070 XT title: b0ea61d5 seconds: 60 exit: 0x0 frames shown: 1671 (PresentX 1671) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14838 MB ``` **Not tested** - In-game world gameplay beyond the 60-second startup/menu smoke run (`XCL_NETWORK=0`) and NVIDIA / wave32-only GPUs. **AI use** - Codex (GPT 6.1 Terra Medium): AI-assisted implementation and synthetic unit tests; verified with workspace unit tests and local RX 9070 XT smoke run.
gut0to commented 2026-11-24 18:57:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:57:23Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:ivall/xcl:review:6045444159 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#pullrequestreview-6045444159). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-24T18:57:23Z. **Review:** COMMENTED --- 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.
crosettiremi commented 2026-11-24 19:07:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crosettiremi on 2026-11-24T18:10:54Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7140275052 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7140275052). Originally posted by [crosettiremi](https://github.com/crosettiremi) on 2026-11-24T18:10:54Z. --- 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.
DavidM1911 commented 2026-11-24 19:07:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:52:31Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141273815 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7141273815). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:52:31Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
hajduzsolt commented 2026-11-24 21:08:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T19:25:20Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7142072299 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7142072299). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T19:25:20Z. --- 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.
hajduzsolt commented 2026-11-24 21:08:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T19:34:39Z.


Thanks for flagging this. I removed the stale duplicate section and preserved both existing smoke blocks verbatim.

<!-- greyfinch-sync:ivall/xcl:comment:7142296311 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7142296311). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-24T19:34:39Z. --- Thanks for flagging this. I removed the stale duplicate section and preserved both existing smoke blocks verbatim.
gigabyteZ390 commented 2026-11-24 21:09:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gigabyteZ390 on 2026-11-24T20:55:51Z.


Tested 370246cdf1990ae47015cd6c0b3268a252b8f96e (head of #1438) against its base b9b6ea62080cc62fc19e212033372d01c6214e5c, on NVIDIA (wave32), the case listed under Not tested.

Tested

  • NVIDIA GeForce RTX 3070 8 GB, driver 621.40; Intel Core i9-9900K, 32 GB; Windows 11 Pro 26H2 build 26300.9974; Rust 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2609; debug for the tests, release for the smoke runs
  • .\scripts\test.ps1 on the head, with XCL_SAMPLE_RPF / _DLLS / _TTPF set: 890 passed, 0 failed, 42 ignored; unvalidated_request_sizes_rejected_without_allocating passes
  • SKIPPED on this adapter: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows) – the same three as on main
  • scripts/smoke.ps1, a retail title, 60 s, base and head each run twice and the second run recorded (shader caches warm):

base:

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: NVIDIA GeForce RTX 3070
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1611 (PresentX 1611)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 14724 MB

PR:

xcl-smoke v1
commit: 370246cdf1990ae47015cd6c0b3268a252b8f96e
gpu: NVIDIA GeForce RTX 3070
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1617 (PresentX 1617)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14729 MB
  • DirectStorage in those two runs (xcl.log activity lines): 9767 requests, 650 MB, 0 failed on the base and on the head alike. The logged requests were all file sources (zlib or plain); no physical-page request was logged.

The new test passes without the fix. Applied alone (only the test hunk) onto b9b6ea6, cargo test -p xcl --lib unvalidated_request_sizes_rejected_without_allocating gives 1 passed. Both cases already returned these HRESULTs before the PR: a file read past its end got E_END_OF_FILE from read_exact_at, and the unreadable memory source got E_ACCESS_VIOLATION; the base just allocated source_size bytes first (dstorage.rs:880 and :897 on b9b6ea6). The test checks the HRESULTs, not that nothing is allocated before the checks, so it does not show the fix.

Not tested

  • A real oversized or out-of-bounds request: the title sent none in 60 s (0 failed on the base too), so the new rejection paths were not reached by it
  • The cold-cache out-of-memory exit reported in the comments above: not reproduced in these runs
  • Physical-page sources and destinations, AMD (the author's RX 9070 XT run covers it), GPUs with native wave64

Written by Claude Code (Claude Opus 5.5) from runs on this machine; checked before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7144246641 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7144246641). Originally posted by [gigabyteZ390](https://github.com/gigabyteZ390) on 2026-11-24T20:55:51Z. --- Tested `370246cdf1990ae47015cd6c0b3268a252b8f96e` (head of #1438) against its base `b9b6ea62080cc62fc19e212033372d01c6214e5c`, on NVIDIA (wave32), the case listed under **Not tested**. **Tested** - NVIDIA GeForce RTX 3070 8 GB, driver 621.40; Intel Core i9-9900K, 32 GB; Windows 11 Pro 26H2 build 26300.9974; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2609; debug for the tests, release for the smoke runs - `.\scripts\test.ps1` on the head, with `XCL_SAMPLE_RPF` / `_DLLS` / `_TTPF` set: **890 passed, 0 failed, 42 ignored**; `unvalidated_request_sizes_rejected_without_allocating` passes - `SKIPPED` on this adapter: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) – the same three as on main - `scripts/smoke.ps1`, a retail title, 60 s, base and head each run twice and the second run recorded (shader caches warm): base: ``` xcl-smoke v1 commit: b9b6ea62080cc62fc19e212033372d01c6214e5c gpu: NVIDIA GeForce RTX 3070 title: retail-title seconds: 60 exit: 0x0 frames shown: 1611 (PresentX 1611) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 14724 MB ``` PR: ``` xcl-smoke v1 commit: 370246cdf1990ae47015cd6c0b3268a252b8f96e gpu: NVIDIA GeForce RTX 3070 title: retail-title seconds: 60 exit: 0x0 frames shown: 1617 (PresentX 1617) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14729 MB ``` - DirectStorage in those two runs (`xcl.log` activity lines): 9767 requests, 650 MB, 0 failed on the base and on the head alike. The logged requests were all file sources (zlib or plain); no physical-page request was logged. **The new test passes without the fix.** Applied alone (only the test hunk) onto `b9b6ea6`, `cargo test -p xcl --lib unvalidated_request_sizes_rejected_without_allocating` gives `1 passed`. Both cases already returned these HRESULTs before the PR: a file read past its end got `E_END_OF_FILE` from `read_exact_at`, and the unreadable memory source got `E_ACCESS_VIOLATION`; the base just allocated `source_size` bytes first (`dstorage.rs:880` and `:897` on `b9b6ea6`). The test checks the HRESULTs, not that nothing is allocated before the checks, so it does not show the fix. **Not tested** - A real oversized or out-of-bounds request: the title sent none in 60 s (0 failed on the base too), so the new rejection paths were not reached by it - The cold-cache out-of-memory exit reported in the comments above: not reproduced in these runs - Physical-page sources and destinations, AMD (the author's RX 9070 XT run covers it), GPUs with native wave64 Written by Claude Code (Claude Opus 5.5) from runs on this machine; checked before posting.
throny commented 2026-11-25 01:10:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-25T00:27:00Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7148521621 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7148521621). Originally posted by [throny](https://github.com/throny) on 2026-11-25T00:27:00Z. --- <!-- xcl-1607-hint:D54 --> 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.
anes66 commented 2026-11-25 07:05:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by anes66 on 2026-11-25T06:31:13Z.


CPU-only DirectStorage error-path verification on exact head 370246cdf1990ae47015cd6c0b3268a252b8f96e passed. Optional companion b6a0a3d is directly on that head and adds one test only.

Tested

  • Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. No GPU, DXC or title execution.
  • An isolated child has a 64 MiB Windows process-commit cap. The fixture file has a logical length of 128 MiB; its contents are never read. A BC1-shaped request passes Request::check(false) and targets an eight-byte sentinel buffer.
  • A source span starting one byte past the last valid starting offset returns E_END_OF_FILE before the 128 MiB source allocation. The in-bounds span instead returns E_OUTOFMEMORY; both leave every destination byte unchanged. The real D3D12 device pointer stays null.
  • cargo test --locked -p xcl --lib file_bounds_precede_allocator_refusal_and_refusal_preserves_destination -j 2 -- --nocapture --test-threads=1: 1 passed / 0 failed / 0 ignored / 0 skips.
  • Existing unvalidated_request_sizes_rejected_without_allocating filter: 1 passed / 0 failed / 0 ignored / 0 skips.
  • Negative controls: bypassing the file-end check produces E_OUTOFMEMORY instead of E_END_OF_FILE; replacing the fallible file-source buffer with the original vec! aborts the child with memory allocation of 134217728 bytes failed. Both cause the parent test to fail. Restored before final passing runs and commit.

Not tested
Full queue/status propagation for the new case (it calls execute with an explicit synthetic FileInner), compressed contents, zlib/BCPack intermediate/output allocation failures, physical-page destinations, actual system memory pressure, release, GPU/workspace suite, retail smoke or newer-main integration. No claim that this PR fixes a particular retail crash. The job cap is child-only and does not change the parent or system configuration.

AI use: Codex (GPT-6; exact variant unavailable) wrote the test and temporary controls, ran CPU verification and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7154874717 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7154874717). Originally posted by [anes66](https://github.com/anes66) on 2026-11-25T06:31:13Z. --- CPU-only DirectStorage error-path verification on exact head `370246cdf1990ae47015cd6c0b3268a252b8f96e` passed. Optional companion [b6a0a3d](https://github.com/anes66/xcl/commit/b6a0a3d38fdad46a5ec49ab9aeef34e9fb797efe) is directly on that head and adds one test only. **Tested** - Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. No GPU, DXC or title execution. - An isolated child has a 64 MiB Windows process-commit cap. The fixture file has a logical length of 128 MiB; its contents are never read. A BC1-shaped request passes `Request::check(false)` and targets an eight-byte sentinel buffer. - A source span starting one byte past the last valid starting offset returns `E_END_OF_FILE` before the 128 MiB source allocation. The in-bounds span instead returns `E_OUTOFMEMORY`; both leave every destination byte unchanged. The real D3D12 device pointer stays null. - `cargo test --locked -p xcl --lib file_bounds_precede_allocator_refusal_and_refusal_preserves_destination -j 2 -- --nocapture --test-threads=1`: **1 passed / 0 failed / 0 ignored / 0 skips**. - Existing `unvalidated_request_sizes_rejected_without_allocating` filter: **1 passed / 0 failed / 0 ignored / 0 skips**. - Negative controls: bypassing the file-end check produces `E_OUTOFMEMORY` instead of `E_END_OF_FILE`; replacing the fallible file-source buffer with the original `vec!` aborts the child with `memory allocation of 134217728 bytes failed`. Both cause the parent test to fail. Restored before final passing runs and commit. **Not tested** Full queue/status propagation for the new case (it calls `execute` with an explicit synthetic `FileInner`), compressed contents, zlib/BCPack intermediate/output allocation failures, physical-page destinations, actual system memory pressure, release, GPU/workspace suite, retail smoke or newer-main integration. No claim that this PR fixes a particular retail crash. The job cap is child-only and does not change the parent or system configuration. AI use: Codex (GPT-6; exact variant unavailable) wrote the test and temporary controls, ran CPU verification and prepared this report.
hajduzsolt commented 2026-11-25 15:07:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-25T14:38:08Z.


Thank you for checking the regression against the base, and thanks to @anes66 for the test contribution. Commit 81e9b62 adds the isolated allocator-refusal test: an out-of-bounds source returns E_END_OF_FILE before allocation, while an in-bounds source reports E_OUTOFMEMORY under the child-only memory cap; both leave the destination unchanged.

  • cargo test -p xcl --lib file_bounds_precede_allocator_refusal_and_refusal_preserves_destination -- --test-threads=2: 1 passed, 0 failed, 0 ignored.
  • cargo test --workspace -- --test-threads=2: passed, 0 failures; the xcl unit suite reported 842 passed and 22 ignored, with additional workspace and documentation tests passing.

The updated head is queued for automated RX 9070 XT smoke re-verification.

<!-- greyfinch-sync:ivall/xcl:comment:7165583130 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7165583130). Originally posted by [hajduzsolt](https://github.com/hajduzsolt) on 2026-11-25T14:38:08Z. --- Thank you for checking the regression against the base, and thanks to @anes66 for the test contribution. Commit `81e9b62` adds the isolated allocator-refusal test: an out-of-bounds source returns `E_END_OF_FILE` before allocation, while an in-bounds source reports `E_OUTOFMEMORY` under the child-only memory cap; both leave the destination unchanged. - `cargo test -p xcl --lib file_bounds_precede_allocator_refusal_and_refusal_preserves_destination -- --test-threads=2`: 1 passed, 0 failed, 0 ignored. - `cargo test --workspace -- --test-threads=2`: passed, 0 failures; the xcl unit suite reported 842 passed and 22 ignored, with additional workspace and documentation tests passing. The updated head is queued for automated RX 9070 XT smoke re-verification.
DavidM1911 commented 2026-11-26 06:06:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:13:02Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • Does not compile after the merge — semantic conflict:
error[E0061]: this function takes 5 arguments but 4 arguments were supplied
    --> crates\xcl\src\hle\dstorage.rs:2995:28
    --> crates\xcl\src\hle\dstorage.rs:2997:28

A callee gained a parameter on main; the PR's call sites need updating on rebase.

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7183285567 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7183285567). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:13:02Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - Does not compile after the merge — semantic conflict: ``` error[E0061]: this function takes 5 arguments but 4 arguments were supplied --> crates\xcl\src\hle\dstorage.rs:2995:28 --> crates\xcl\src\hle\dstorage.rs:2997:28 ``` A callee gained a parameter on `main`; the PR's call sites need updating on rebase. — Devin
Foniass commented 2026-12-01 05:45:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:45:03Z.


Triage (#1607) – head 81e9b62

#1785 overlaps heavily in dstorage.rs execute(): it adds the same file-length check (offset + source_size past the end -> E_END_OF_FILE) before the read buffer and the same try_reserve_exact -> E_OUTOFMEMORY for the source buffers. It also caps request sizes at 256 MiB in Request::check and makes the zlib and BCPack output buffers fallible, while this PR adds the physical-page range checks for source and destination and a test under a job memory limit. #1381 only makes bcpack::decode's output buffer fallible. The three solve the same problem in different ways; one combined PR would be easier to review.
The PR conflicts with main (execute now takes dest_on_stack and file_input and reads files into a cached buffer, which this change has to cover too).
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302097551 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1438#issuecomment-7302097551). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:45:03Z. --- **Triage (#1607)** – head 81e9b62 #1785 overlaps heavily in dstorage.rs execute(): it adds the same file-length check (offset + source_size past the end -> E_END_OF_FILE) before the read buffer and the same try_reserve_exact -> E_OUTOFMEMORY for the source buffers. It also caps request sizes at 256 MiB in Request::check and makes the zlib and BCPack output buffers fallible, while this PR adds the physical-page range checks for source and destination and a test under a job memory limit. #1381 only makes bcpack::decode's output buffer fallible. The three solve the same problem in different ways; one combined PR would be easier to review. The PR conflicts with main (execute now takes dest_on_stack and file_input and reads files into a cached buffer, which this change has to cover too). Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1438:upstream-pr/1438'
git switch 'upstream-pr/1438'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1438'
git switch 'upstream-pr/1438'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1438'
git switch 'upstream-pr/1438'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1438'
git switch 'main'
git merge --squash 'upstream-pr/1438'
git switch 'main'
git merge --ff-only 'upstream-pr/1438'
git switch 'main'
git merge 'upstream-pr/1438'
git push origin 'main'
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
xcl-dev/xcl!1428
No description provided.