XGameRuntime: XAsync* entry points dereference null XAsyncBlock when forwarding to system xgameruntime.dll #1390
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#1390
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@microwave805 on GitHub · 2026-11-24 15:31 UTC · original
Checked on
main(930e8b4).Problem
All 8
XAsync*entry points incrates/xcl/src/hle/xgameruntime/xasync.rs(XAsyncBeginat:228-241,XAsyncScheduleat:261-268,XAsyncCompleteat:279-288,XAsyncGetStatusat:329-346,XAsyncGetResultSizeat:349-373,XAsyncGetResultat:375-388,XAsyncCancelat:446-452,XAsyncRunat:462-469) forward topc(slot)(System32\xgameruntime.dll) before checkingb.is_null()(orprovider == 0/work == 0):Verified directly against Windows
C:\Windows\System32\xgameruntime.dll: all 8 COM slots dereferenceb + 0x24without a null check and immediately raiseSTATUS_ACCESS_VIOLATIONreading0x0000000000000024.Minimal trigger
On any Windows 10/11 machine with Gaming Services installed (
PC_ASYNC != 0, set byapi.rs:165-169), call any XCL async wrapper that forwardsbwithout pre-checking null (e.g.,XUserAddAsync(0, null),XGameSaveInitializeProviderAsync(..., null),XGameSaveReadBlobDataAsync(..., null),XGameSaveSubmitUpdateAsync(..., null),XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync(null), or anyXAsync*directly) withb = null. Unit tests don't hit this because they run withPC_ASYNC == 0.In
begin_with_fixups(xasync.rs:557-564), the crash occurs beforePayloadcleanup can run.Suggested fix
Run the
b.is_null()(andprovider == 0/work == 0/result == E_PENDING) validation checks beforeif let Some((o, f)) = pc(...)in all 8XAsync*functions.AI use: Antigravity (Gemini 4 Neon) performed the read-only source audit and drafted this issue; checked and verified on
930e8b4before opening.