util: a negative return spec past i64::MIN is refused, not flipped positive #1700
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!1700
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1700"
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?
@b3IKK on GitHub · 2026-11-24 19:24 UTC · original
b3IKK:util/parse-ret-negative-range→main· +17 −2 · 1 files · 1 commits · openutil::parse_ret(the return values indata/stubdb.tomland ininit_dboverrides) negated a negative spec's magnitude asu64:That is right for
-1(0xFFFF_FFFF, a console HRESULT) but wraps for anything belowi64::MIN:"-9223372036854775809"came back as0x7FFF_FFFF_FFFF_FFFF, a positive value where a negative one was asked for, and"-+1"parsed as-1becauseu64::from_straccepts a leading+.This takes a negative spec as
i64(which acceptsi64::MINitself) and refuses everything below it instead of flipping it positive. The hex form and a wholeu64are unchanged.What is in it
crates/xcl/src/util.rs: parse the decimal spec asi64beforeu64inparse_ret; add unit testa_negative_return_spec_is_not_wrapped_around_i64_min(fails onmain:-9223372036854775809→Some(9223372036854775807)instead ofNone).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 960 passed, 0 failed, 43 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib util::tests: 6 passed, 0 failedRegression run
main (
1d027e5, clean tree, no local changes):PR (
b509a70, clean tree, no local changes):Not tested
AI use
util::parse_ret, wrote the fix and unit test (and confirmed it fails without the fix), rebased onto1d027e5, ran the test suite andscripts/smoke.ps1regression runs with #677's title hashing, and drafted this PR description.parse_ret negated the magnitude as u64 ("-1" is 0xFFFF_FFFF, a console HRESULT), so any magnitude above i64::MAX wrapped: the stub override "-9223372036854775809" parsed as 0x7FFF_FFFF_FFFF_FFFF - a positive value where the user asked for a negative one - and "-+1" parsed as -1. Take a negative spec as i64 (which takes i64::MIN itself) and let it fail for anything below it; a whole u64 and the hex form are unchanged. Assisted-by: OpenCode (Gemini 4 Neon)@b3IKK on GitHub · 2026-11-24 22:07 UTC · original
Rebased onto
1d027e5and re-ran: 960 passed, 0 failed, 43 ignored; both blocks above are from the current scripts/smoke.ps1 (#677's hashed itle: line), and the head run is 1643 frames / 0 crashes / 0 device removals against main's 1553.@DavidM1911 on GitHub · 2026-11-24 22:09 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
@JJAutoCompare on GitHub · 2026-11-25 04:02 UTC · original
XCL PR #1700 verification
Head
b509a70707bff971ca7e12e3560d4d0c5ccdf51dwas checked out detached and clean. The PR changes onlycrates/xcl/src/util.rs.STOR-WINLAB ran Windows 11 Enterprise Evaluation x64 (build 26200) on an AMD Ryzen 7 3800X with an Intel Arc A770 (driver 32.0.101.9175). DXC was 1.9.2609.5 and rustc was 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Cargo used unoptimized dev/test profiles with incremental compilation and debug info disabled.
Tested
cargo build --workspaceandcargo test --workspace --no-runboth exited 0 outside the Arc mutex. The latter compiled 19 test binaries.cargo test -p xcl --lib util::tests::return_specs -- --exactandcargo test -p xcl --lib util::tests::a_negative_return_spec_is_not_wrapped_around_i64_min -- --exacteach reported 1 passed, 0 failed, 0 ignored, 0 skipped. Both ran outside the mutex withXCL_ADAPTER=NONE_CPU_ONLY. They verified named, hexadecimal and decimal returns, signed values throughi64::MIN, rejection of overflow and malformed signs, and acceptance ofu64::MAX.cargo test --workspace --no-fail-fast -- --test-threads=4ran once insideInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Cargo exited 101. Summing all 20test result:lines (19 binaries and 1 doctest target) gave 941 passed, 19 failed and 43 ignored. Both return-spec tests passed in this run too.Workspace failures and skips
CreateComputePipelineStateerror0x80070057. Four had output mismatches in FMA overflow, implicit-LOD sampling, f16 lane preservation and wave64 pixel reduction.SKIPPED. Seventeen cite unavailable wave64 and three cite refused wave32 per-lane forms. Five cover tiled-resource tier, heap windows, driver-cache controls and missing debug-layer support. These lines provide no test coverage.Not tested
Matched
mainbaseline, retail-title smoke runs, and other GPU vendors. Failure provenance is undetermined.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1700-suite.logand published.@DavidM1911 on GitHub · 2026-11-26 06:07 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
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.