fix: parallel shadow scan cuts no lower than its own start #389
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!389
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-389"
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?
@LooperSalty on GitHub · 2026-11-26 15:25 UTC · original
LooperSalty:fix/parallel-scan-boundary→main· +34 −2 · 2 files · 2 commits · merged 2026-11-26 23:17 UTCBug fix taken from
stellarr-studio/kelvaroq(patch0009, at their commit1270c42), credited as rule 10 asks (Source:andCo-authored-by:in the message, a row inTHIRD_PARTY.md).The bug
Shadow::differingsplits a span into pieces that several threads scan in parallel. When the span starts in the middle of a piece (a buffer at an odd address), the first cut was rounded down below the span's own start. The first thread then scanned nothing, or the cut walked back, so the changed bytes at the start of such a buffer could be missed.The fix
Cuts are clamped to the span's start. A new test,
unaligned_parallel_scan_covers_the_first_piece, fails without the change: a span that starts mid-piece, with a change in its first bytes, must be found.No switch: this is a bug fix.
Test plan
cargo test --release -p victory-gpuon the porting branch: 245 passed; only the 3 WARP tests that also fail onmainfailcargo xtask policy: 216 files ok🤖 Generated with Claude Code
https://claude.ai/code/session_01LwHrL62nyr3m1M4tJsHRox
@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 15:25 UTC · original
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
We couldn’t complete this review. Comment
@codex reviewto try again.8d91ca9ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 15:25 UTC · original
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
@Lewandox on GitHub · 2026-11-26 16:40 UTC · original · approved these changes
Reviewed
scan_boundary, its caller inShadow::differing, the newunaligned_parallel_scan_covers_the_first_piecetest, and theTHIRD_PARTY.mdattribution:at.saturating_sub((start + at) % PIECE).max(from)eliminates the underflow/wrap that occurred whenfrom < (start + from) % PIECE(e.g.from == 0on an unaligned buffer), whereat - (start + at) % PIECEwrapped in release builds and caused the first thread to seea > band skip the opening piece.i > 0,at >= from + PER_THREAD(16 MiB >> PIECE), so every interior cut lands on a piece boundary>= from, andcutsstays strictly monotonic withcuts[0] == fromandcuts[threads] == to.THIRD_PARTY.mdcreditsstellarr-studio/kelvaroq(1270c42) cleanly and CI is 4/4 green.Looks good to merge!