Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested PR #343 at head
Behavior covered: Checks duplicate and nested DXBC part offsets are rejected while adjacent empty parts remain accepted. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 9459c12 on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (267 passed, 0 failed). victory translate <title exe> --validate --pipelines gives the same counts before and after: 12 of 12 programs emitted, 12 validated, 12 pipelines. So the title's embedded containers still parse with the stricter check, which was the regression I wanted to rule out.
Sorting (offset, offset + 8 + len) and rejecting end > next start catches duplicate offsets and nested parts. Adjacent parts, including empty ones (end == next start), stay valid, and parts keeps its original order because only the copy is sorted.
No issues found. Nit: the PR description is pasted rich HTML, which renders oddly on GitHub. Plain Markdown would read better.
AI-assisted (Claude Code).
…ainer parts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I think #326 covers this. I copied the three tests from this PR unchanged into #326 at If the maintainer prefers this one because it's smaller, the sort-then- AI-assisted. |
…isak#306 Marvisak#333 Marvisak#105 Marvisak#288 Marvisak#343 Marvisak#353 Marvisak#326 Marvisak#259 Marvisak#179 Marvisak#176 Marvisak#226 Marvisak#286) Conflicts: - emit/lower.rs: shader-opcodes and shader-tracking each keyed heap handles by the resource properties (a tuple vs two flattened words); the same key, shader-tracking's form and comment kept. Lowered's test-only fields, test imports and tests of both sides kept. - emit/wave.rs: tests of both sides kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#1504, verified together Merges Marvisak#1145 Marvisak#343 Marvisak#1042 Marvisak#1303 Marvisak#477 on top of the stack of Marvisak#1504 (Marvisak#1319, Marvisak#1402, Marvisak#1492, Marvisak#1504, on main ffe310e), each head unchanged, no conflicts and no changes of mine. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (406 passed, 6 ignored; main has 342 passed, 6 ignored). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…#1504, verified together Merges Marvisak#1145 Marvisak#343 Marvisak#1042 Marvisak#1303 Marvisak#477 on top of the stack of Marvisak#1504 (Marvisak#1319, Marvisak#1402, Marvisak#1492, Marvisak#1504, on main ffe310e), each head unchanged, no conflicts and no changes of mine. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (406 passed, 6 ignored; main has 342 passed, 6 ignored). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs work. The overlap check in CI: no check runs on the head commit. Generated by Claude Code |
Problem
Container::parse()validates individual DXBC part boundaries but does not check whether multiple parts overlap.As a result, malformed containers with duplicate part offsets or nested parts are accepted.
Fix
Collect and sort the byte ranges of parsed parts.
Reject intersecting ranges with
ShaderError::Malformed.Preserve the original part order.
Allow valid adjacent parts, including empty payloads.
This complements #326, which addresses parts overlapping the container header rather than each other.
Verification
Apple M5, macOS arm64, Rust 1.98.1, base commit
Test | Before | After -- | -- | -- Duplicate offsets | FAIL | PASS Nested part | FAIL | PASS Adjacent empty parts | PASS | PASS Complete shader unit test suite | — | 59/59 PASSd2a4bae.Clippy (
--lib -- -D warnings): clean.The existing non-Windows
constant_colordead-code warning is unchanged.All test containers are synthetic. No game data was used.
AI-assisted implementation and test preparation (ChatGPT), with tests executed locally on Apple Silicon.