tooling: refuse non-finite --timeout in dxc_compile_time #2794
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2802"
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 R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-26T11:00:06Z.
Change
tools/dxc_compile_time.pyonly checkedargs.timeout <= 0.--timeout inf(or1e999) passed that check and later crashed withOverflowError: timestamp out of range for platform time_tfromproc.communicate(timeout=inf).--timeout nanalso passed and ended inInvalid value NaN.The tool now rejects non-finite values with
parser.error("--timeout must be a finite positive number")before any work, the same ruletools/mesh_od_pipeline.pyalready uses (math.isfinite(value) and value > 0).tests/dxc_compile_time_cli_check.pygets cases fornan,inf,-inf(written as--timeout=-inf, because argparse reads a separate-infas a flag) and1e999. The existing0case still matches "positive".Verification
python -B tests/dxc_compile_time_cli_check.pywith the fix: Ran 7 tests, OK.origin/maincopy of the tool (copied to a scratch dir, tool and test side by side): Ran 7 tests, FAILED (failures=4), one for each of nan, inf,--timeout=-inf, 1e999.python -B tools/dxc_compile_time.py --dxc <python.exe> --timeout inf --variants controlnow prints the usage line anderror: --timeout must be a finite positive number, exit code 2.python -B tests/dxc_compile_time_check.py <dxc.exe>->dxc_compile_time_check: OK;python -B tests/dxc_gvn_output_check.py <dxc.exe> <offscreen_check.exe> warp->dxc_gvn_output_check: OK.Evidence and follow-up
No follow-up. The check is already registered as
dxc_compile_time_cli_checkinCMakeLists.txt.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:02:18Z.
Review: COMMENTED
Review of head
fd50ae36(comment only).--timeoutnow fails fast unless finite and positive (math.isfinite), same rule astools/mesh_od_pipeline.py. nan, inf and 1e999 no longer reachcommunicate(timeout=...).tests/dxc_compile_time_cli_check.pyadds nan, inf,--timeout=-infand 1e999 cases.Commands run locally:
python3 -B tests/dxc_compile_time_cli_check.py: 7 tests OKargs.timeout <= 0only): 3 failuresmath.isnan): 2 failures (inf and 1e999 cases)python3 tests/docs_links_check.py: OKpython3 tests/bidi_controls_check.py: OKgit diff --check origin/main...HEAD: cleanNo blocking findings.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T11:02:19Z.
Win2025 WARP receipt for head
fd50ae36after updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
fd50ae369c1206e3daeb3a31e8b07ffd08b64912:tests/dxc_compile_time_cli_check.pyok (3.2s,PYCHECK rc=0)x2w_pipe.py win2025 2802 --wait 7200 --keep-release --py-checks tests/dxc_compile_time_cli_check.pyAI-assisted; commands listed were executed locally.