XGameRuntime: XAsyncGetResult writes 0 into *used while pending #1196

Open
Longno242 wants to merge 1 commit from upstream-pr/1205 into main
Longno242 commented 2026-11-24 13:14:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-24T13:14:03Z.


XAsyncGetResult returned E_PENDING (and some failure HRESULTs) without writing *used. libHttpClient always writes *bufferUsed first (0 when there is no result yet), so a caller's leftover sentinel could look like a real length.

Related to #1201 (GetResultSize); this covers GetResult's *used out-parameter. Open #1188 is about preserving non-zero success HRESULTs, not this.

What is in it

  • crates/xcl/src/hle/xgameruntime/xasync.rs: write *used = 0 on pending and failure paths; unit test with a 0xDEAD sentinel

Tested

  • Hardware/OS (full suite by @jennydeth): RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head c3aa9bd
  • Commit tested: c3aa9bdf81c584411922271b58a6db7e8786de37 (clean tree)
  • cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored. SKIPPED: 2 GPU tests for no wave64 (expected on this card)
  • SKIPPED: 2 GPU tests for no wave64 (expected on this card)
  • Retail smoke: see Regression run

Note: Branch was rebased onto current main after this smoke. The blocks below are from the pre-rebase head and are no longer a valid title-run for the current tip — a fresh scripts/smoke.ps1 pair is needed before merge.
(@Toons29, RX 9070)

Regression run

  • Retail scripts/smoke.ps1 from @Toons29 (RX 9070, 60 s, same title/time; blocks as printed):
xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: c3aa9bdf81c584411922271b58a6db7e8786de37
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1604 (PresentX 1604)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Not tested

  • Full cargo test --workspace
  • Live libHttpClient against system XGameRuntime
  • live libHttpClient against the system XGameRuntime

AI use

  • @jennydeth: Claude Code (Claude Opus 5.5) ran the full workspace suite and reported results in a PR comment
  • Cursor Auto (Composer): found the gap next to #1201, implemented the fix and test, opened this draft PR. Exact underlying model name not disclosed to the agent.
<!-- greyfinch-sync:ivall/xcl:issue:5472835223 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205). Originally posted by [Longno242](https://github.com/Longno242) on 2026-11-24T13:14:03Z. --- `XAsyncGetResult` returned `E_PENDING` (and some failure HRESULTs) without writing `*used`. libHttpClient always writes `*bufferUsed` first (0 when there is no result yet), so a caller's leftover sentinel could look like a real length. Related to #1201 (`GetResultSize`); this covers `GetResult`'s `*used` out-parameter. Open #1188 is about preserving non-zero success HRESULTs, not this. **What is in it** - `crates/xcl/src/hle/xgameruntime/xasync.rs`: write `*used = 0` on pending and failure paths; unit test with a `0xDEAD` sentinel **Tested** - Hardware/OS (full suite by @jennydeth): RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head c3aa9bd - Commit tested: `c3aa9bdf81c584411922271b58a6db7e8786de37` (clean tree) - `cargo test --workspace -- --test-threads=4`: **742 passed, 0 failed, 41 ignored. SKIPPED: 2 GPU tests for no wave64 (expected on this card)** - `SKIPPED`: 2 GPU tests for no wave64 (expected on this card) - Retail smoke: see **Regression run** > **Note:** Branch was rebased onto current `main` after this smoke. The blocks below are from the pre-rebase head and are no longer a valid title-run for the current tip — a fresh `scripts/smoke.ps1` pair is needed before merge. (@Toons29, RX 9070) **Regression run** - Retail `scripts/smoke.ps1` from @Toons29 (RX 9070, 60 s, same title/time; blocks as printed): ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: c3aa9bdf81c584411922271b58a6db7e8786de37 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1604 (PresentX 1604) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` **Not tested** - Full `cargo test --workspace` - Live libHttpClient against system XGameRuntime - live libHttpClient against the system XGameRuntime **AI use** - @jennydeth: Claude Code (Claude Opus 5.5) ran the full workspace suite and reported results in a PR comment - Cursor Auto (Composer): found the gap next to #1201, implemented the fix and test, opened this draft PR. Exact underlying model name not disclosed to the agent.
DavidM1911 commented 2026-11-24 14:06:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:28:46Z.


Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug.

  • cargo test -p xcl --lib xasync: 16 passed, 0 failed — includes the new get_result_writes_zero_used_while_pending.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7132888103 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1205#issuecomment-7132888103). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:28:46Z. --- Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug. - `cargo test -p xcl --lib xasync`: **16 passed, 0 failed** — includes the new `get_result_writes_zero_used_while_pending`. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Toons29 commented 2026-11-25 04:10:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:15:47Z.


Regression run of c3aa9bdf on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: c3aa9bdf81c584411922271b58a6db7e8786de37
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1604 (PresentX 1604)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Against the limits in CONTRIBUTING.md: 99 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7151747272 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7151747272). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T03:15:47Z. --- Regression run of `c3aa9bdf` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: c3aa9bdf81c584411922271b58a6db7e8786de37 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1604 (PresentX 1604) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` Against the limits in CONTRIBUTING.md: 99 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Longno242 commented 2026-11-25 13:05:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-25T12:36:33Z.


Thanks @Toons29 — pasted both of your xcl-smoke v1 blocks under Regression run so the description check can see them.

<!-- greyfinch-sync:ivall/xcl:comment:7162609023 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7162609023). Originally posted by [Longno242](https://github.com/Longno242) on 2026-11-25T12:36:33Z. --- Thanks @Toons29 — pasted both of your `xcl-smoke v1` blocks under **Regression run** so the description check can see them.
Longno242 commented 2026-11-25 13:05:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-25T12:43:52Z.


CI is stuck on action_required (first-time contributor workflow approval). Smoke + PR description are green; please approve the pending CI workflow when you get a chance.

<!-- greyfinch-sync:ivall/xcl:comment:7162776243 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7162776243). Originally posted by [Longno242](https://github.com/Longno242) on 2026-11-25T12:43:52Z. --- CI is stuck on `action_required` (first-time contributor workflow approval). Smoke + **PR description** are green; please approve the pending **CI** workflow when you get a chance.
jennydeth commented 2026-11-25 13:05:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-25T13:00:59Z.


Full workspace run (listed under Not tested).

Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head c3aa9bd.

Result: cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored. SKIPPED: 2 GPU tests for no wave64 (expected on this card).

Not tested: live libHttpClient against the system XGameRuntime.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7163171648 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7163171648). Originally posted by [jennydeth](https://github.com/jennydeth) on 2026-11-25T13:00:59Z. --- Full workspace run (listed under Not tested). Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head c3aa9bd. Result: cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored. SKIPPED: 2 GPU tests for no wave64 (expected on this card). Not tested: live libHttpClient against the system XGameRuntime. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Longno242 commented 2026-11-25 14:09:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-25T13:21:11Z.


Thanks @jennydeth — copied your workspace counts into Tested (742 passed, 0 failed, 41 ignored. SKIPPED: 2 GPU tests for no wave64 (expected on this card)).

<!-- greyfinch-sync:ivall/xcl:comment:7163652503 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7163652503). Originally posted by [Longno242](https://github.com/Longno242) on 2026-11-25T13:21:11Z. --- Thanks @jennydeth — copied your workspace counts into **Tested** (742 passed, 0 failed, 41 ignored. SKIPPED: 2 GPU tests for no wave64 (expected on this card)).
github-actions[bot] commented 2026-11-29 07:43:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:26Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252650144 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7252650144). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:43:26Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Longno242 commented 2026-11-29 20:44:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-29T20:44:05Z.


Still waiting on a maintainer: description/smoke are in place; CI needs first-time-contributor workflow approval. Not abandoned.

<!-- greyfinch-sync:ivall/xcl:comment:7262315438 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7262315438). Originally posted by [Longno242](https://github.com/Longno242) on 2026-11-29T20:44:05Z. --- Still waiting on a maintainer: description/smoke are in place; CI needs first-time-contributor workflow approval. Not abandoned.
Foniass commented 2026-12-01 05:07:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:07:06Z.


Triage (#1607) – head c3aa9bd

Related but not overlapping: #1201 (same author) makes the same fix for XAsyncGetResultSize; this one changes XAsyncGetResult (xasync.rs), which main still leaves *used untouched on E_PENDING and failure. The new test covers the pending case only; the failed-status paths are not tested. The identity-mismatch E_INVALIDARG and E_NOT_SUFFICIENT_BUFFER returns still leave *used unchanged.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301438882 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7301438882). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:07:06Z. --- **Triage (#1607)** – head c3aa9bd Related but not overlapping: #1201 (same author) makes the same fix for `XAsyncGetResultSize`; this one changes `XAsyncGetResult` (xasync.rs), which main still leaves `*used` untouched on E_PENDING and failure. The new test covers the pending case only; the failed-status paths are not tested. The identity-mismatch E_INVALIDARG and E_NOT_SUFFICIENT_BUFFER returns still leave `*used` unchanged. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
BBareth commented 2026-12-01 09:38:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T09:38:45Z.


merge-check claim
head: c3aa9bdf81

<!-- greyfinch-sync:ivall/xcl:comment:7306999550 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7306999550). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T09:38:45Z. --- merge-check claim head: c3aa9bdf81c584411922271b58a6db7e8786de37
BBareth commented 2026-12-01 09:59:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T09:59:51Z.


merge-check
base: 493dbd3dd0
head: c3aa9bdf81
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2901 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, same machine, same commit: 2900 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache). The new test get_result_writes_zero_used_while_pending ran and passed.
review: no blocking finding; one file (+29/-0), every line read. XAsyncGetResult writes 0 into *used (when it is not null) before it returns E_PENDING or a failed status, in the finished and in the active branch; successful paths are unchanged. The E_INVALIDARG returns (unknown block, wrong identity) still leave *used alone. Note for the maintainer: #1201 adds its test at the same place in the same file, so the second of the two to merge will need a small conflict resolved. Not tested here: a retail title that reads *used after a pending call.
performance: none: one store on the pending and failure paths.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7307513454 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7307513454). Originally posted by [BBareth](https://github.com/BBareth) on 2026-12-01T09:59:51Z. --- merge-check base: 493dbd3dd0cd50b4c3e8d28f73ab9b504fcd8158 head: c3aa9bdf81c584411922271b58a6db7e8786de37 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2901 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, same machine, same commit: 2900 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache). The new test `get_result_writes_zero_used_while_pending` ran and passed. review: no blocking finding; one file (+29/-0), every line read. `XAsyncGetResult` writes 0 into `*used` (when it is not null) before it returns `E_PENDING` or a failed status, in the finished and in the active branch; successful paths are unchanged. The `E_INVALIDARG` returns (unknown block, wrong identity) still leave `*used` alone. Note for the maintainer: #1201 adds its test at the same place in the same file, so the second of the two to merge will need a small conflict resolved. Not tested here: a retail title that reads `*used` after a pending call. performance: none: one store on the pending and failure paths. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
brainhay5 commented 2026-12-01 10:06:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T10:06:21Z.


merge-check claim
head: c3aa9bdf81

<!-- greyfinch-sync:ivall/xcl:comment:7307675429 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7307675429). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-12-01T10:06:21Z. --- merge-check claim head: c3aa9bdf81c584411922271b58a6db7e8786de37
brainhay5 commented 2026-12-01 11:48:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T11:48:24Z.


merge-check claim withdrawn
Our automated merge-check loop claimed this PR and then stopped before posting a check — two loops were running at once and both are now shut down. No check from us is coming, so this claim is void and the head is free for someone else to take.

AI use: an agent posted this withdrawal.

<!-- greyfinch-sync:ivall/xcl:comment:7310169700 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7310169700). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-12-01T11:48:24Z. --- merge-check claim withdrawn Our automated merge-check loop claimed this PR and then stopped before posting a check — two loops were running at once and both are now shut down. No check from us is coming, so this claim is void and the head is free for someone else to take. *AI use: an agent posted this withdrawal.*
cj-tomlin commented 2026-12-01 19:08:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T19:08:33Z.


merge-check claim
head: c3aa9bdf81

<!-- greyfinch-sync:ivall/xcl:comment:7322257804 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7322257804). Originally posted by [cj-tomlin](https://github.com/cj-tomlin) on 2026-12-01T19:08:33Z. --- merge-check claim head: c3aa9bdf81c584411922271b58a6db7e8786de37
cj-tomlin commented 2026-12-01 19:15:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T19:15:49Z.


merge-check
base: 6bfb5c5153
head: c3aa9bdf81
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 1 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (its disabled child run fails), which fails on the base too: run alone 6 times each, 5 of 6 failed on the merge and 6 of 6 on main 6bfb5c51, same machine. It passed in my full-suite runs of two other PRs on the same base earlier today, so it is intermittent here; this PR does not touch that path. The new xasync::tests::get_result_writes_zero_used_while_pending passes, and fails when I take the fix's pending write back out of the merged tree.
review: none blocking, after reading the whole diff (+29/-0, xasync.rs). XAsyncGetResult writes 0 into a non-null *used before returning E_PENDING or a failed status, in the finished and in the active branch; successful paths are unchanged. CPU-side only, so this NVIDIA-only run covers it. Not blocking: (1) the test covers the pending case only, not the two failed-status writes; (2) the E_INVALIDARG and E_NOT_SUFFICIENT_BUFFER returns still leave *used alone; (3) #1201 adds its test at the same place in xasync.rs: merging #1201 on top of this merge gives a content conflict, so whichever of the two lands second needs a rebase.
performance: none: one store on the pending and failure paths.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 621.40, AMD Ryzen 7 7800X3D, Windows 11 build 26300, debug build / Claude Code (Claude Opus 5.5) merged, built, ran the suite, read the diff and drafted this; I checked it.

<!-- greyfinch-sync:ivall/xcl:comment:7322501087 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7322501087). Originally posted by [cj-tomlin](https://github.com/cj-tomlin) on 2026-12-01T19:15:49Z. --- merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: c3aa9bdf81c584411922271b58a6db7e8786de37 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 1 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: `gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` (its `disabled` child run fails), which fails on the base too: run alone 6 times each, 5 of 6 failed on the merge and 6 of 6 on `main` `6bfb5c51`, same machine. It passed in my full-suite runs of two other PRs on the same base earlier today, so it is intermittent here; this PR does not touch that path. The new `xasync::tests::get_result_writes_zero_used_while_pending` passes, and fails when I take the fix's pending write back out of the merged tree. review: none blocking, after reading the whole diff (+29/-0, `xasync.rs`). `XAsyncGetResult` writes 0 into a non-null `*used` before returning `E_PENDING` or a failed status, in the finished and in the active branch; successful paths are unchanged. CPU-side only, so this NVIDIA-only run covers it. Not blocking: (1) the test covers the pending case only, not the two failed-status writes; (2) the `E_INVALIDARG` and `E_NOT_SUFFICIENT_BUFFER` returns still leave `*used` alone; (3) #1201 adds its test at the same place in `xasync.rs`: merging #1201 on top of this merge gives a content conflict, so whichever of the two lands second needs a rebase. performance: none: one store on the pending and failure paths. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB, driver 621.40, AMD Ryzen 7 7800X3D, Windows 11 build 26300, debug build / Claude Code (Claude Opus 5.5) merged, built, ran the suite, read the diff and drafted this; I checked it.
Longno242 commented 2026-12-02 20:47:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Longno242 on 2026-12-02T20:47:17Z.


Rebased onto current main (resolved conflict with #1201's get_result_size_writes_zero_while_pending — kept both tests). cargo test -p xcl --lib xasync::: 16 passed, 0 failed. Not abandoned — clearing stale / needs-rebase.

Pre-rebase retail smoke in the description is stale after the rebase; needs a fresh title-run pair on the new tip before merge.

<!-- greyfinch-sync:ivall/xcl:comment:7358316025 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7358316025). Originally posted by [Longno242](https://github.com/Longno242) on 2026-12-02T20:47:17Z. --- Rebased onto current `main` (resolved conflict with #1201's `get_result_size_writes_zero_while_pending` — kept both tests). `cargo test -p xcl --lib xasync::`: 16 passed, 0 failed. Not abandoned — clearing stale / needs-rebase. Pre-rebase retail smoke in the description is stale after the rebase; needs a fresh title-run pair on the new tip before merge.
Foniass commented 2026-12-02 21:07:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T21:07:10Z.


Follow-up review of a2d968f4, since c3aa9bd (code reading only, not a merge-check; PR description red) · 1 medium

In short: The PR makes XAsyncGetResult write 0 into *used while the operation is pending. Since the triage note on c3aa9bd it was only rebased onto main: git range-diff shows the commit's change is the same. The earlier point about untested paths still stands, and nothing blocks it.

Medium

  1. Only the pending case is tested (still open). The test covers E_PENDING. Neither the failed-status paths that now also write 0, nor the E_INVALIDARG (identity mismatch) and E_NOT_SUFFICIENT_BUFFER returns that still leave *used unchanged, are tested. Add a case for a failed operation, so the difference between the two kinds of return is pinned down.
Checked and fine
  • The rebase onto main dropped nothing.
  • #1201 (same author, the same fix for XAsyncGetResultSize) is now on main, so the two calls agree on *used while pending.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7358817285 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1205#issuecomment-7358817285). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T21:07:10Z. --- **Follow-up review** of `a2d968f4`, since `c3aa9bd` (code reading only, not a merge-check; `PR description` red) · 1 medium **In short:** The PR makes `XAsyncGetResult` write 0 into `*used` while the operation is pending. Since the triage note on `c3aa9bd` it was only rebased onto `main`: `git range-diff` shows the commit's change is the same. The earlier point about untested paths still stands, and nothing blocks it. #### Medium 1. **Only the pending case is tested (still open).** The test covers `E_PENDING`. Neither the failed-status paths that now also write 0, nor the `E_INVALIDARG` (identity mismatch) and `E_NOT_SUFFICIENT_BUFFER` returns that still leave `*used` unchanged, are tested. Add a case for a failed operation, so the difference between the two kinds of return is pinned down. <details><summary>Checked and fine</summary> - The rebase onto `main` dropped nothing. - #1201 (same author, the same fix for `XAsyncGetResultSize`) is now on `main`, so the two calls agree on `*used` while pending. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1205:upstream-pr/1205'
git switch 'upstream-pr/1205'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1205'
git switch 'upstream-pr/1205'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1205'
git switch 'upstream-pr/1205'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1205'
git switch 'main'
git merge --squash 'upstream-pr/1205'
git switch 'main'
git merge --ff-only 'upstream-pr/1205'
git switch 'main'
git merge 'upstream-pr/1205'
git push origin 'main'
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!1196
No description provided.