Handle upload allocation failures and bound ray-tracing scans #625

Manually merged
github merged 2 commits from github-bot/gh-625 into main 2026-11-29 00:27:53 +00:00 AGit
Owner

@⁠cnuonr on GitHub · 2026-11-28 01:57 UTC · original
cnuonr:fix/upload-allocation-failures → main · +115 −29 · 1 files · 2 commits · merged 2026-11-29 00:24 UTC

Problem

A failed commit of an early upload reservation removes its address from the pool even though Windows still holds the reservation. Subsequent uploads can no longer retry it. An unrepresentable block-rounded length also panics in the allocator. The process-heap fallback uses an infallible allocation even though callers already handle a missing upload.

The ray-tracing address scan also treats adjacent occupied blocks as a single upload. It reads into the next allocation and into padding beyond the requested byte count.

Changes

  • Keep the early reservation until its commit succeeds.
  • Check block rounding for both the reserved pool and upload arenas.
  • Allocate the heap fallback with a fallible reservation and preserve zero initialization.
  • Track each upload's initialized end in the arena so address scans stop at that upload's boundary.

Verification

cargo test --locked -p victory-gpu --lib upload::tests passed all 9 tests on Windows. A simulated commit failure, the two rounding-overflow cases, and both scan-boundary cases fail on the original implementation. The heap fallback test checks zero initialization and rejection of an unrepresentable capacity. The tests use generated data.

**@⁠cnuonr** on GitHub · 2026-11-28 01:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/625) `cnuonr:fix/upload-allocation-failures` → `main` · +115 −29 · 1 files · 2 commits · merged 2026-11-29 00:24 UTC ## Problem A failed commit of an early upload reservation removes its address from the pool even though Windows still holds the reservation. Subsequent uploads can no longer retry it. An unrepresentable block-rounded length also panics in the allocator. The process-heap fallback uses an infallible allocation even though callers already handle a missing upload. The ray-tracing address scan also treats adjacent occupied blocks as a single upload. It reads into the next allocation and into padding beyond the requested byte count. ## Changes - Keep the early reservation until its commit succeeds. - Check block rounding for both the reserved pool and upload arenas. - Allocate the heap fallback with a fallible reservation and preserve zero initialization. - Track each upload's initialized end in the arena so address scans stop at that upload's boundary. ## Verification `cargo test --locked -p victory-gpu --lib upload::tests` passed all 9 tests on Windows. A simulated commit failure, the two rounding-overflow cases, and both scan-boundary cases fail on the original implementation. The heap fallback test checks zero initialization and rejection of an unrepresentable capacity. The tests use generated data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:57:45 +00:00
github-bot changed title from Handle upload allocation failures without losing reservations to Handle upload allocation failures and bound ray-tracing scans 2026-11-28 02:09:28 +00:00
github-bot referenced this pull request from a commit 2026-11-29 00:27:22 +00:00
github manually merged commit b5d203a05f into main 2026-11-29 00:27:53 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!625
No description provided.