DirectStorage: reject file ranges past end before allocation #1427
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1427
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1427/head"
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?
@hajduzsolt on GitHub · 2026-11-24 15:51 UTC · original
hajduzsolt:fix/dstorage-file-range-check→main· +21 −0 · 1 files · 1 commits · closed without mergingA file-source request allocates its staging buffer before discovering that the requested range is past EOF. Check nonempty ranges against the file length first, including offset overflow. Empty reads keep their existing behavior. Part of #1392.
What is in it
crates/xcl/src/hle/dstorage.rs: validate file ranges before allocation and test boundary, overflow and empty-read cases without fixtures.Tested
cargo test -p xcl --lib file_ranges_reject_truncation_and_offset_overflow: 1 passed, 0 failed.cargo test --workspace -- --test-threads=4 --nocapture: 752 passed, 0 failed, 41 ignored. The reported passes include tests that return early.test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state(D3D12 debug layer unavailable).Regression run
main: not run
PR: not run
Not tested
AI use
Pull request closed