Shaders: scan short archive records at the end of the input #1098
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1107"
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?
Imported from ivall/xcl. Originally posted by anakatt on 2026-11-24T11:40:42Z.
I fixed
pack::scandropping valid short records at the end of its input. The loop required more than 32 bytes remaining, but the accepted record format needs only 23 bytes at minimum. A synthetic 28-byte record was ignored without trailing padding.What is in it
Tested
macOS Darwin 24.6.0, arm64; rustc 1.99.1, miniz_oxide 0.9.1; debug. No GPU used.
A temporary Cargo harness linked the actual repository
crates/xcl/src/gpu/pack.rsas its library, without compiling the Windows runtime or mocking the scanner.Before the fix,
cargo test --offline --manifest-path /tmp/xcl-pack-probe.ANtIu4/Cargo.toml --test short_recordsfailed: the 28-byte record returned no records.After the fix,
cargo test --offline --manifest-path /tmp/xcl-pack-probe.ANtIu4/Cargo.toml --test short_records --test bounds: 2 passed, 0 failed, 0 ignored, 0 skipped. The harness checked four short-record/prefix combinations plus short buffers and out-of-range offsets, and was removed afterward.Windows 11 Pro ARM64 10.0.26100.1742 in UTM (4 GiB VM RAM, Red Hat VirtIO GPU DOD), running x64 binaries through Windows emulation; rustc 1.100.0
x86_64-pc-windows-msvc, Windows SDK 26100. Debug build withCARGO_PROFILE_DEV_DEBUG=0,CARGO_PROFILE_TEST_DEBUG=0,CARGO_BUILD_JOBS=1; no GPU tests selected.Exact source archive
5ab17d4fc701aecb1b3b017229b08a908114a5ee, aftercargo clean -p xcl:cargo test --locked -p xcl --lib gpu::pack -- --test-threads=4: 5 passed, 0 failed, 0 ignored, 715 filtered out; no SKIPPED lines. The newshort_records_do_not_need_trailing_paddingtest ran and passed. An earlier shared-cache run reused the prior test executable and is not counted as verification of this revision.Regression run
Not tested
AI use
openai-codex/gpt-6-astra) to find and reproduce the boundary bug, write the fix and regression, run the isolated native harness and focused Windows tests, and prepare this description.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:25:19Z.
Full-suite run, since this PR has no test report yet. Tested exact head
5ab17d4(on its base47efa2e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.short_records_do_not_need_trailing_padding.Not tested
AI use
upstream-sync referenced this pull request2026-11-25 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:11:52Z.
Regression run of
5ab17d4fon the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:21:54Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:36Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:50:21Z.
Triage (#1607) – head
5ab17d4No open or merged PR changes
pack::scan's loop bound. The other PRs that touched pack.rs (#4, #8, #2906) are closed and kept the- 32bound. The new bound is right: a candidate needs at least 1 + 3 + 18 + 1 = 23 bytes. Every read in the loop body is still guarded byheader_end <= d.len()befored[p]andrd32(.., p + 14), so no index can go out of range. No problems found in the diff.Minor: the README line sits between the command block and the launcher-menu bullet, and it would read better in the
xcl rpfdescription.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.