XGameRuntime: XAsyncGetResultSize writes 0 while the operation is pending #1192
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1201"
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 ivall/xcl. Originally posted by Longno242 on 2026-11-24T13:08:42Z.

XAsyncGetResultSizereturnedE_PENDINGwithout writing*size. libHttpClient always writes*bufferSizefirst (0 while pending), so a caller's leftover sentinel could be mistaken for a real size.No open issue tracked this; checked that open XAsync PRs (#1188, #1176, #670, …) do not cover GetResultSize's pending path.
What is in it
crates/xcl/src/hle/xgameruntime/xasync.rs: write*size = 0on pending (and on finished blocks); unit test with a0xDEADsentinelTested
8b57a0d8b57a0daf1f78cd20c7478db53c65336191de540(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)Regression run
scripts/smoke.ps1from @Toons29 (RX 9070, 60 s, same title/time; blocks as printed):Not tested
cargo test --workspaceAI use
*bufferSizecontract, implemented the fix and test, opened this draft PR. Exact underlying model name not disclosed to the agent.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:32:13Z.
Independent verification on current
main384f7f7(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 — XAsyncGetResultSize pending-write change keeps the suite green.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:14:37Z.
Regression run of
8b57a0daon the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 101 % of
main's frames, 99 % 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.Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-25T12:36:30Z.
Thanks @Toons29 — pasted both of your
xcl-smoke v1blocks under Regression run so the description check can see them.Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-25T12:43:44Z.
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.Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-25T13:01:18Z.
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
8b57a0d.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.
Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-25T13:21:01Z.
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)).
upstream-sync referenced this pull request2026-11-26 05:05:05 +00:00
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:22Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Longno242 on 2026-11-29T20:44:02Z.
Still waiting on a maintainer: description/smoke are in place; CI needs first-time-contributor workflow approval. Not abandoned.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:05:16Z.
Triage (#1607) – head
8b57a0d#670 (a draft that also changes the recompiler) contains the same XAsyncGetResultSize hunk; this PR is the focused version with a test. #1205 makes the matching change in XAsyncGetResult (
*used), so the two complement each other rather than overlap.No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T09:38:47Z.
merge-check claim
head:
8b57a0daf1Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T09:51:49Z.
merge-check claim
head:
8b57a0daf1Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T09:59:38Z.
merge-check claim
head:
8b57a0daf1Imported from ivall/xcl. Originally posted by BBareth on 2026-12-01T09:59:53Z.
merge-check
base:
493dbd3dd0head:
8b57a0daf1merge: 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_size_writes_zero_while_pendingran and passed.review: no blocking finding; one file (+24/-1), every line read.
XAsyncGetResultSizewrites 0 into*size(when it is not null) before returningE_PENDING, and for a finished block now also when its status is a failure (it wrote 0 only on success before). Note for the maintainer: #1205 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*sizeafter a pending call.performance: none: one store on the pending path.
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.
Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T11:48:21Z.
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.
Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T18:58:25Z.
merge-check claim
head:
8b57a0daf1Imported from ivall/xcl. Originally posted by cj-tomlin on 2026-12-01T19:04:00Z.
merge-check
base:
6bfb5c5153head:
8b57a0daf1merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2905 passed, 0 failed, 51 ignored; SKIPPED: 27 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer / d3d12SDKLayers.dll); failing: none. The new
xasync::tests::get_result_size_writes_zero_while_pendingpasses, and fails at its pending assertion when I take the fix's pending write back out of the merged tree.review: none blocking, after reading the whole diff (+24/-1,
xasync.rs).XAsyncGetResultSizenow writes 0 into a non-null*sizebefore returningE_PENDING, and for a finished block also when its status is a failure (before: only on success); the done-and-active path still writesresult_size. CPU-side only; no GPU path, so this NVIDIA-only run covers it. #670 (a draft) carries the same hunk alongside recompiler changes; #1205 does the matching change forXAsyncGetResult.performance: none: one store on a pending call.
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.