DXIL assemble: guard null/empty DXC blobs, null COM interfaces, and 32-bit IR length #2577

Merged
Decodere merged 1 commit from upstream-pr/2587 into main 2026-11-29 12:19:41 +00:00
Decodere commented 2026-11-26 00:29:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T00:29:04Z.


Fixes three DXC FFI safety bugs in crates/xcl/src/gpu/recomp/dxil/assemble.rs: empty/null DXC blob slice::from_raw_parts UB in errors() and assemble(), missing null COM interface pointer check in make<T>(), and silent 32-bit IR length truncation via ir.len() as u32. Part of #2413, Part of #1833, Part of #1269.

What is in it

  • crates/xcl/src/gpu/recomp/dxil/assemble.rs (blob_bytes, errors, assemble): factor blob_bytes(ptr, len) returning Ok(&[]) when len == 0 (never calling slice::from_raw_parts on null), Err("null DXC blob buffer") when ptr.is_null() && len > 0, and Ok(slice) otherwise; trim trailing \0 bytes in errors() and fall back to formatting the failed HRESULT when the error buffer is missing, empty, or whitespace-only; reject an empty validated container in assemble() with "assemble: empty DXIL container".
  • crates/xcl/src/gpu/recomp/dxil/assemble.rs (make): check if p.is_null() after DxcCreateInstance returns S_OK before calling T::from_raw(p), returning Err("DxcCreateInstance: returned null interface").
  • crates/xcl/src/gpu/recomp/dxil/assemble.rs (blob_len, assemble): validate ir.len() with u32::try_from(len) instead of truncating via ir.len() as u32 before calling IDxcUtils::CreateBlob.
  • crates/xcl/src/gpu/recomp/dxil/assemble.rs (mod tests): added 3 pure-CPU / mock-COM 0-skip unit tests (blob_bytes_and_blob_len_validate_null_empty_and_bounds, make_rejects_null_interface_and_propagates_hresult, and errors_handles_null_empty_blob_trims_nuls_and_falls_back_to_hresult) alongside preserved ir_text_assembles_signs_and_runs.

Tested

  • hardware (GPU + driver, CPU), Rust version, debug / release: Windows 11 Home (build 26200), NVIDIA GeForce RTX 4060 8 GB (driver 621.14, 32-lane waves), Intel Core i5-11400F (6C/12T), 32 GB RAM, rustc 1.100.0, DXC 1.9.2609.5, --release.
  • Failing-first on unmodified 08db8020: make_rejects_null_interface_and_propagates_hresult aborted with 0xc000001d (STATUS_ILLEGAL_INSTRUCTION) inside IUnknown::from_raw(null) before the null-pointer guard was added.
  • Post-fix targeted cargo test --release -p xcl --lib -- gpu::recomp::dxil::assemble::tests:: --nocapture: 4 passed, 0 failed, 0 ignored, 0 skips on both RTX 4060 and WARP (XCL_ADAPTER=warp, XCL_WARP=1).
  • cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture: 37 test binaries, 1432 passed, 0 failed, 47 ignored (SKIPPED GPU/host tests: 29 pre-existing on 32-lane RTX 4060 without D3D12 debug layer — 21 no wave64, 3 per-lane wave32 refused, 3 no D3D12 debug layer, 1 no heap windows, 1 cannot disable driver cache; 0 skipped in gpu::recomp::dxil::assemble::tests).

Regression run

main:

xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1549 (PresentX 1549)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13985 MB

PR:

xcl-smoke v1
commit: 534deb254f8404238be1c7a89f4198cf26a65e1a
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1573 (PresentX 1573)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13994 MB

Not tested

  • 64-lane AMD hardware (wave64 GPU tests skipped on 32-lane RTX 4060) and D3D12 debug-layer tests (SDK layers DLL not installed on host).
  • 4 GiB+ live CreateBlob allocation (covered via blob_len((u32::MAX as usize) + 1) unit check).

AI use

  • Google Antigravity (Gemini 4 Neon) implemented the DXC blob/COM null-safety and IR length checks, added the pure-CPU and mock-COM unit tests, ran the failing-first, post-fix, workspace, and paired 60 s smoke verifications, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5501647142 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2587). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T00:29:04Z. --- Fixes three DXC FFI safety bugs in `crates/xcl/src/gpu/recomp/dxil/assemble.rs`: empty/null DXC blob `slice::from_raw_parts` UB in `errors()` and `assemble()`, missing null COM interface pointer check in `make<T>()`, and silent 32-bit IR length truncation via `ir.len() as u32`. Part of #2413, Part of #1833, Part of #1269. **What is in it** - `crates/xcl/src/gpu/recomp/dxil/assemble.rs` (`blob_bytes`, `errors`, `assemble`): factor `blob_bytes(ptr, len)` returning `Ok(&[])` when `len == 0` (never calling `slice::from_raw_parts` on null), `Err("null DXC blob buffer")` when `ptr.is_null() && len > 0`, and `Ok(slice)` otherwise; trim trailing `\0` bytes in `errors()` and fall back to formatting the failed `HRESULT` when the error buffer is missing, empty, or whitespace-only; reject an empty validated container in `assemble()` with `"assemble: empty DXIL container"`. - `crates/xcl/src/gpu/recomp/dxil/assemble.rs` (`make`): check `if p.is_null()` after `DxcCreateInstance` returns `S_OK` before calling `T::from_raw(p)`, returning `Err("DxcCreateInstance: returned null interface")`. - `crates/xcl/src/gpu/recomp/dxil/assemble.rs` (`blob_len`, `assemble`): validate `ir.len()` with `u32::try_from(len)` instead of truncating via `ir.len() as u32` before calling `IDxcUtils::CreateBlob`. - `crates/xcl/src/gpu/recomp/dxil/assemble.rs` (`mod tests`): added 3 pure-CPU / mock-COM `0`-skip unit tests (`blob_bytes_and_blob_len_validate_null_empty_and_bounds`, `make_rejects_null_interface_and_propagates_hresult`, and `errors_handles_null_empty_blob_trims_nuls_and_falls_back_to_hresult`) alongside preserved `ir_text_assembles_signs_and_runs`. **Tested** - hardware (GPU + driver, CPU), Rust version, debug / release: Windows 11 Home (build 26200), NVIDIA GeForce RTX 4060 8 GB (driver 621.14, 32-lane waves), Intel Core i5-11400F (6C/12T), 32 GB RAM, `rustc 1.100.0`, DXC `1.9.2609.5`, `--release`. - Failing-first on unmodified `08db8020`: `make_rejects_null_interface_and_propagates_hresult` aborted with `0xc000001d` (`STATUS_ILLEGAL_INSTRUCTION`) inside `IUnknown::from_raw(null)` before the null-pointer guard was added. - Post-fix targeted `cargo test --release -p xcl --lib -- gpu::recomp::dxil::assemble::tests:: --nocapture`: `4 passed, 0 failed, 0 ignored`, `0` skips on both RTX 4060 and WARP (`XCL_ADAPTER=warp`, `XCL_WARP=1`). - `cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture`: `37` test binaries, `1432 passed, 0 failed, 47 ignored` (SKIPPED GPU/host tests: 29 pre-existing on 32-lane RTX 4060 without D3D12 debug layer — 21 no wave64, 3 per-lane wave32 refused, 3 no D3D12 debug layer, 1 no heap windows, 1 cannot disable driver cache; 0 skipped in `gpu::recomp::dxil::assemble::tests`). **Regression run** main: ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1549 (PresentX 1549) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13985 MB ``` PR: ``` xcl-smoke v1 commit: 534deb254f8404238be1c7a89f4198cf26a65e1a gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1573 (PresentX 1573) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13994 MB ``` **Not tested** - 64-lane AMD hardware (wave64 GPU tests skipped on 32-lane RTX 4060) and D3D12 debug-layer tests (SDK layers DLL not installed on host). - 4 GiB+ live `CreateBlob` allocation (covered via `blob_len((u32::MAX as usize) + 1)` unit check). **AI use** - Google Antigravity (Gemini 4 Neon) implemented the DXC blob/COM null-safety and IR length checks, added the pure-CPU and mock-COM unit tests, ran the failing-first, post-fix, workspace, and paired 60 s smoke verifications, and drafted this PR description.
futurepro62 commented 2026-11-26 01:05:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T00:41:43Z.


Full-suite run, since this PR has no test report yet. Tested exact head 534deb25 (on its base 08db802).

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::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1420 passed, 0 failed, 45 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, dispatch_chain_native_wave64_builds_whole, 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.
  • The new tests ran and passed: blob_bytes_and_blob_len_validate_null_empty_and_bounds, make_rejects_null_interface_and_propagates_hresult, errors_handles_null_empty_blob_trims_nuls_and_falls_back_to_hresult.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1431 passed, 0 failed, 47 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))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 08db8020 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

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.
<!-- greyfinch-sync:ivall/xcl:comment:7179020733 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2587#issuecomment-7179020733). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-26T00:41:43Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `534deb25` (on its base `08db802`). **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::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1420 passed, 0 failed, 45 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`, `dispatch_chain_native_wave64_builds_whole`, `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`. - The new tests ran and passed: `blob_bytes_and_blob_len_validate_null_empty_and_bounds`, `make_rejects_null_interface_and_propagates_hresult`, `errors_handles_null_empty_blob_trims_nuls_and_falls_back_to_hresult`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1431 passed, 0 failed, 47 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))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `08db8020` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **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.
DarkPanda69 commented 2026-11-26 01:05:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-26T00:52:59Z.


64-lane AMD run (listed as untested; the report above is NVIDIA): the 3 new tests pass, and nothing else changes in the GPU suite on an RX 9070 XT or an RTX 3060.

Head 534deb2 applied on main b49be18, debug, Windows 11 Pro 26200, cargo test -p xcl --lib -- gpu:: --test-threads=4 on main and with the PR, card chosen with XCL_ADAPTER:

main this PR
RX 9070 XT (RDNA4, 32.0.32029.2010) 708 passed, 2 failed, 6 SKIPPED 711 passed, 2 failed, 6 SKIPPED
RTX 3060 (32.0.16.1088) 710 passed, 0 failed, 24 SKIPPED 713 passed, 0 failed, 24 SKIPPED

On both cards, the only result changes against main are the new blob_bytes_and_blob_len_validate_null_empty_and_bounds, errors_handles_null_empty_blob_trims_nuls_and_falls_back_to_hresult and make_rejects_null_interface_and_propagates_hresult, all ok, with no new skips. So the wave64 GPU tests that skip on a 32-lane GPU ran with this PR on the RX 9070 XT and still pass. The 2 RX 9070 XT failures are the AMD fuzz seeds tracked in #2115, the same on main.

Not tested: the D3D12 debug-layer tests (no d3d12SDKLayers.dll here either), Intel, a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7179208912 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2587#issuecomment-7179208912). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-26T00:52:59Z. --- 64-lane AMD run (listed as untested; the report above is NVIDIA): the 3 new tests pass, and nothing else changes in the GPU suite on an RX 9070 XT or an RTX 3060. Head `534deb2` applied on `main` `b49be18`, debug, Windows 11 Pro 26200, `cargo test -p xcl --lib -- gpu:: --test-threads=4` on `main` and with the PR, card chosen with `XCL_ADAPTER`: | | `main` | this PR | |---|---|---| | RX 9070 XT (RDNA4, 32.0.32029.2010) | 708 passed, 2 failed, 6 SKIPPED | 711 passed, 2 failed, 6 SKIPPED | | RTX 3060 (32.0.16.1088) | 710 passed, 0 failed, 24 SKIPPED | 713 passed, 0 failed, 24 SKIPPED | On both cards, the only result changes against `main` are the new `blob_bytes_and_blob_len_validate_null_empty_and_bounds`, `errors_handles_null_empty_blob_trims_nuls_and_falls_back_to_hresult` and `make_rejects_null_interface_and_propagates_hresult`, all ok, with no new skips. So the wave64 GPU tests that skip on a 32-lane GPU ran with this PR on the RX 9070 XT and still pass. The 2 RX 9070 XT failures are the AMD fuzz seeds tracked in #2115, the same on `main`. Not tested: the D3D12 debug-layer tests (no `d3d12SDKLayers.dll` here either), Intel, a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
DavidM1911 commented 2026-11-26 02:08:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:09:46Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7179495611 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2587#issuecomment-7179495611). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T01:09:46Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
throny commented 2026-11-28 16:26:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:26:45Z.


merge-check claim
head: 534deb254f

<!-- greyfinch-sync:ivall/xcl:comment:7242248654 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2587#issuecomment-7242248654). Originally posted by [throny](https://github.com/throny) on 2026-11-28T16:26:45Z. --- merge-check claim head: 534deb254f8404238be1c7a89f4198cf26a65e1a
throny commented 2026-11-28 16:48:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:48:39Z.


merge-check
base: db3921dc
head: 534deb254f
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2148 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at db3921dc: 2145 passed, 0 failed, 48 ignored.
review: no blocking finding; all hunks read. Nothing that was reported before is hidden now: an empty error buffer gives the HRESULT instead of an empty message. One behaviour change to know: an empty DXIL container is now an error where main returned an empty result; I did not trace what every caller did with the empty result. Not verified: that the bindings turn a null interface out-pointer into an error for every call used here.
performance: none. The file is not in the translator source lists: no re-translation.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7242530278 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2587#issuecomment-7242530278). Originally posted by [throny](https://github.com/throny) on 2026-11-28T16:48:39Z. --- merge-check base: db3921dc head: 534deb254f8404238be1c7a89f4198cf26a65e1a merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2148 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at db3921dc: 2145 passed, 0 failed, 48 ignored. review: no blocking finding; all hunks read. Nothing that was reported before is hidden now: an empty error buffer gives the HRESULT instead of an empty message. One behaviour change to know: an empty DXIL container is now an error where main returned an empty result; I did not trace what every caller did with the empty result. Not verified: that the bindings turn a null interface out-pointer into an error for every call used here. performance: none. The file is not in the translator source lists: no re-translation. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
thehollowedone commented 2026-11-28 22:03:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T22:03:22Z.


merge-check
base: 7db2f391ce (7db2f391)
head: 534deb254f (534deb25)
merge: clean; one file, +116/-8 against its parent; git diff --check passed.
build: cargo build --offline --locked -j 4 --workspace passed on the merged tree.
tests: cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 on the merged tree: 2,596 passed, 1 failed, 49 ignored, with 26 explicit SKIPPED notices. Untouched base with the same command: 2,593 passed, 1 failed, 49 ignored, with the same 26 skips. Both complete runs failed only gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk (DXIL not compiled yet). The three new assemble tests passed on the PR tree. A separate PR run produced four additional pipeline-library/warm-library failures and two two-pass-cache integration failures; an earlier base run aborted in a parallel PSO thread before its library-test summary. These extra results were not stable across reruns, and I cannot attribute them to this PR.
review: no blocking source finding. The only in-tree assemble caller requires a nonempty DXBC result or an error, so rejecting an empty container preserves its contract. The locked Windows bindings reject null COM out-pointers from CreateBlob, AssembleToContainer, GetResult, GetErrorBuffer, and Validate; the three raw DxcCreateInstance calls now check both HRESULT and pointer before taking ownership. The blob slices are consumed while their COM owners are alive.
performance: not measured; the change is in DXIL assembly error handling.
verdict: safe to merge for the reviewed change, subject to the repository's CI and maintainer batch run. The workspace suite is not green on either tested tree because of the shared mesh-cache failure.
hardware / tool and model: Windows 11 build 26300; RTX 3080 Ti, driver 621.35; Ryzen 7 9800X3D; rustc 1.99.1 MSVC; DXC 1.8.2502.11; debug. Codex (GPT-6.2 Sol) ran the merge, build, tests and source review; Codex (GPT-6.2 Astra) independently traced the FFI and caller boundaries.

<!-- greyfinch-sync:ivall/xcl:comment:7246464251 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2587#issuecomment-7246464251). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-28T22:03:22Z. --- merge-check base: 7db2f391cefd748d47c7de63d50dd43ebb852185 ([`7db2f391`](https://github.com/xcl-dev/xcl/commit/7db2f391cefd748d47c7de63d50dd43ebb852185)) head: 534deb254f8404238be1c7a89f4198cf26a65e1a ([`534deb25`](https://github.com/xcl-dev/xcl/commit/534deb254f8404238be1c7a89f4198cf26a65e1a)) merge: clean; one file, +116/-8 against its parent; `git diff --check` passed. build: `cargo build --offline --locked -j 4 --workspace` passed on the merged tree. tests: `cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4` on the merged tree: **2,596 passed, 1 failed, 49 ignored**, with 26 explicit `SKIPPED` notices. Untouched base with the same command: **2,593 passed, 1 failed, 49 ignored**, with the same 26 skips. Both complete runs failed only `gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk` (`DXIL not compiled yet`). The three new `assemble` tests passed on the PR tree. A separate PR run produced four additional pipeline-library/warm-library failures and two two-pass-cache integration failures; an earlier base run aborted in a parallel PSO thread before its library-test summary. These extra results were not stable across reruns, and I cannot attribute them to this PR. review: no blocking source finding. The only in-tree `assemble` caller requires a nonempty `DXBC` result or an error, so rejecting an empty container preserves its contract. The locked Windows bindings reject null COM out-pointers from `CreateBlob`, `AssembleToContainer`, `GetResult`, `GetErrorBuffer`, and `Validate`; the three raw `DxcCreateInstance` calls now check both HRESULT and pointer before taking ownership. The blob slices are consumed while their COM owners are alive. performance: not measured; the change is in DXIL assembly error handling. verdict: safe to merge for the reviewed change, subject to the repository's CI and maintainer batch run. The workspace suite is not green on either tested tree because of the shared mesh-cache failure. hardware / tool and model: Windows 11 build 26300; RTX 3080 Ti, driver 621.35; Ryzen 7 9800X3D; rustc 1.99.1 MSVC; DXC 1.8.2502.11; debug. Codex (GPT-6.2 Sol) ran the merge, build, tests and source review; Codex (GPT-6.2 Astra) independently traced the FFI and caller boundaries.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2577
No description provided.