e2e: escape embedded NUL bytes in testtitle string literals #1880

Open
github-bot wants to merge 1 commit from github-bot/gh-1880 into main AGit
Owner

@⁠microwave805 on GitHub · 2026-11-24 22:33 UTC · original
microwave805:e2e-testtitle-escape-nuls → main · +2 −2 · 1 files · 1 commits · open

tests/testtitle/src/main.rs contained four raw literal 0x00 bytes inside byte-string literals on lines 372 and 376 (b"CreateWindowExW...", b"CreateWindowExA...", b"XclTestTitleWindow...", b"test title...") instead of \0 escapes. Raw NUL bytes cause editors, rg, and binary-sniffing tools to treat main.rs as binary, and text pipelines that strip or replace NULs silently break the C-string terminators passed to GetProcAddress and CreateWindowExA.

What is in it

  • tests/testtitle/src/main.rs: replace all four literal 0x00 bytes on lines 372 and 376 with \0 escapes (compiled bytecode is identical; raw 0x00 count in main.rs drops from 4 to 0).

Tested

  • Hardware / toolchain: NVIDIA GeForce RTX 3070 (driver 32.0.16.1742), AMD Ryzen 5 5600X, Windows 11 Pro build 22631, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17, debug build.
  • Verified raw 0x00 byte count in tests/testtitle/src/main.rs dropped from 4 to 0.
  • .\scripts\test.ps1 on exact head 1e54b81 (builds xcl-testtitle and runs the e2e suite): 975 passed, 0 failed, 45 ignored (23 GPU tests SKIPPED on this adapter: 18 wave64 skips — 7 standalone no wave64 + 11 wave64 subcases — 3 pre-existing per-lane #1426 diffs, 1 no heap windows, 1 driver-cache disable requiring Windows Developer Mode; XCL_SAMPLE_* env vars unset).

Regression run
Not needed: this PR changes only tests/testtitle/src/main.rs (no runtime code under crates/xcl/src).

Not tested

  • AMD / Intel / native wave64 GPUs, Linux / Wine, and XCL_SAMPLE_* game-data tests.

AI use

  • Antigravity (Gemini 4 Neon): found the raw NUL bytes, replaced them with \0 escapes, ran .\scripts\test.ps1 on 1e54b81, and drafted this description.
**@⁠microwave805** on GitHub · 2026-11-24 22:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/1880) `microwave805:e2e-testtitle-escape-nuls` → `main` · +2 −2 · 1 files · 1 commits · open `tests/testtitle/src/main.rs` contained four raw literal `0x00` bytes inside byte-string literals on lines 372 and 376 (`b"CreateWindowExW..."`, `b"CreateWindowExA..."`, `b"XclTestTitleWindow..."`, `b"test title..."`) instead of `\0` escapes. Raw NUL bytes cause editors, `rg`, and binary-sniffing tools to treat `main.rs` as binary, and text pipelines that strip or replace NULs silently break the C-string terminators passed to `GetProcAddress` and `CreateWindowExA`. **What is in it** - `tests/testtitle/src/main.rs`: replace all four literal `0x00` bytes on lines 372 and 376 with `\0` escapes (compiled bytecode is identical; raw `0x00` count in `main.rs` drops from 4 to 0). **Tested** - Hardware / toolchain: NVIDIA GeForce RTX 3070 (driver `32.0.16.1742`), AMD Ryzen 5 5600X, Windows 11 Pro build 22631, Rust `1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2602.17`, debug build. - Verified raw `0x00` byte count in `tests/testtitle/src/main.rs` dropped from `4` to `0`. - `.\scripts\test.ps1` on exact head `1e54b81` (builds `xcl-testtitle` and runs the e2e suite): **975 passed, 0 failed, 45 ignored** (`23` GPU tests `SKIPPED` on this adapter: 18 wave64 skips — 7 standalone `no wave64` + 11 wave64 subcases — 3 pre-existing per-lane `#1426` diffs, 1 `no heap windows`, 1 driver-cache disable requiring Windows Developer Mode; `XCL_SAMPLE_*` env vars unset). **Regression run** Not needed: this PR changes only `tests/testtitle/src/main.rs` (no runtime code under `crates/xcl/src`). **Not tested** - AMD / Intel / native wave64 GPUs, Linux / Wine, and `XCL_SAMPLE_*` game-data tests. **AI use** - Antigravity (Gemini 4 Neon): found the raw NUL bytes, replaced them with `\0` escapes, ran `.\scripts\test.ps1` on `1e54b81`, and drafted this description.
tests/testtitle/src/main.rs contained four raw 0x00 bytes inside byte-string literals on lines 372 and 376 (CreateWindowExW, CreateWindowExA, XclTestTitleWindow, test title) instead of \0 escapes.

Raw NUL bytes cause editors, ripgrep and binary-sniffing tools to treat main.rs as binary, and text pipelines that replace/strip NULs silently break the C-string terminators passed to GetProcAddress and CreateWindowExA. Replace all four raw bytes with \0 escapes.

Assisted-by: Antigravity (Gemini 4 Neon)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:08:23 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 23:31 UTC · original

Full-suite run, since this PR has no test report yet. Tested exact head 1e54b81 (on its base 689f2db).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 965 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 925 passed, 1 failed, 25 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))).
  • On NVIDIA, --skip leaves out tests that fail on main 689f2db too, not because of this PR. heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh. In gpu::dxil::fuzz_tests, seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card on main as well, with drivers 616.64 and 621.40. With fuzz_tests included, this PR showed the same 4 failures and no others (driver 616.64).
  • The AMD run does not set XCL_REQUIRE_GPU. Its one failure, gpu::dxil::fuzz_tests seed 540 (res[833] 0x7 vs CPU 0x6), happens on main 689f2db too.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 23:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/1880#issuecomment-7147499708) Full-suite run, since this PR has no test report yet. Tested exact head `1e54b81` (on its base `689f2db`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests`: **965 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - No new `#[test]` functions in the diff. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **925 passed, 1 failed, 25 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))). - On NVIDIA, `--skip` leaves out tests that fail on main `689f2db` too, not because of this PR. `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`. In `gpu::dxil::fuzz_tests`, seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card on main as well, with drivers 616.64 and 621.40. With fuzz_tests included, this PR showed the same 4 failures and no others (driver 616.64). - The AMD run does not set `XCL_REQUIRE_GPU`. Its one failure, `gpu::dxil::fuzz_tests` seed 540 (`res[833]` 0x7 vs CPU 0x6), happens on main `689f2db` too. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 01:56 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 01:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1880#issuecomment-7150141391) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:08 UTC · original

PR #1880 verification on STOR-WINLAB

Head 1e54b812d29c9971e4c5f8bcee6649f3f92c9244 matched the requested commit. The diff changes only tests/testtitle/src/main.rs. The parent blob had four literal NUL bytes. Replacing those four bytes with \0 reproduced the PR blob.

Tested

  • Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB with driver 32.0.101.9175 (DoublePrecisionFloatShaderOps=0, wave range 8–32). Rust 1.100.0 (0ef1bc386 2026-11-09), DXC/DXIL 1.9.2609.5, unoptimized dev/test builds with debug info disabled.
  • cargo build --workspace and cargo test --workspace --no-run both exited 0 outside the Arc lock. No xcl-testtitle warnings. xcl emitted two fetch_update deprecation warnings. cargo test -p xcl-testtitle exited 0 with zero unit tests.
  • cargo test -p xcl --test e2e -- --test-threads=1 --nocapture under the Arc lock reported 2 passed, 1 failed, 0 ignored, and 1 explicit skip for missing d3d12SDKLayers.dll. The title passed the changed check for both CreateWindowExW and CreateWindowExA, including the cloaked 1920×1080 client area. The title later failed RSSetDepthBiasX (#94), drawing blue where green was expected. The full run reproduced both outcomes.
  • One locked run of cargo test --workspace --no-fail-fast -- --test-threads=4 exited 101. The 20 result summaries in pr1880-suite.log total 950 passed, 25 failed, 45 ignored. The log contains 22 SKIPPED lines: 17 missing wave64, 3 unsupported per-lane shader operations, 1 missing heap windows, and 1 driver-cache control unavailable. The debug-layer early return was captured by libtest in the full run and is visible in the focused run. Skip paths provide no coverage.
  • The 25 failures were 20 compute pipeline creation errors (0x80070057), 4 shader output mismatches (FMA, mip sampling, f16 high-half preservation, and wave reduction), and the title’s depth-bias failure.

Not tested

Pre-PR baseline, other GPU configurations, retail/sample titles, and debug-layer assertions.

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 pr1880-suite.log and published this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/1880#issuecomment-7151629767) # PR #1880 verification on STOR-WINLAB Head `1e54b812d29c9971e4c5f8bcee6649f3f92c9244` matched the requested commit. The diff changes only `tests/testtitle/src/main.rs`. The parent blob had four literal NUL bytes. Replacing those four bytes with `\0` reproduced the PR blob. **Tested** - Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB with driver 32.0.101.9175 (`DoublePrecisionFloatShaderOps=0`, wave range 8–32). Rust `1.100.0 (0ef1bc386 2026-11-09)`, DXC/DXIL `1.9.2609.5`, unoptimized dev/test builds with debug info disabled. - `cargo build --workspace` and `cargo test --workspace --no-run` both exited 0 outside the Arc lock. No `xcl-testtitle` warnings. `xcl` emitted two `fetch_update` deprecation warnings. `cargo test -p xcl-testtitle` exited 0 with zero unit tests. - `cargo test -p xcl --test e2e -- --test-threads=1 --nocapture` under the Arc lock reported 2 passed, 1 failed, 0 ignored, and 1 explicit skip for missing `d3d12SDKLayers.dll`. The title passed the changed check for both `CreateWindowExW` and `CreateWindowExA`, including the cloaked 1920×1080 client area. The title later failed `RSSetDepthBiasX` (#94), drawing blue where green was expected. The full run reproduced both outcomes. - One locked run of `cargo test --workspace --no-fail-fast -- --test-threads=4` exited 101. The 20 result summaries in `pr1880-suite.log` total **950 passed, 25 failed, 45 ignored**. The log contains **22 `SKIPPED ` lines**: 17 missing wave64, 3 unsupported per-lane shader operations, 1 missing heap windows, and 1 driver-cache control unavailable. The debug-layer early return was captured by libtest in the full run and is visible in the focused run. Skip paths provide no coverage. - The 25 failures were 20 compute pipeline creation errors (`0x80070057`), 4 shader output mismatches (FMA, mip sampling, f16 high-half preservation, and wave reduction), and the title’s depth-bias failure. **Not tested** Pre-PR baseline, other GPU configurations, retail/sample titles, and debug-layer assertions. **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 `pr1880-suite.log` and published this report.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1880/head:github-bot/gh-1880'
git switch 'github-bot/gh-1880'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1880'
git switch 'github-bot/gh-1880'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1880'
git switch 'github-bot/gh-1880'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1880'
git switch 'main'
git merge --squash 'github-bot/gh-1880'
git switch 'main'
git merge --ff-only 'github-bot/gh-1880'
git switch 'main'
git merge 'github-bot/gh-1880'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.