Repository navigation
Conversation
libHttpClient.GDK.dll and XCurl.dll reach the GDK runtime through
xgameruntime.lib's thunks: LoadLibraryW("xgameruntime.dll"), then
GetProcAddress of InitializeApiImpl, InitializeApiImplEx,
InitializeApiImplEx2, QueryApiImpl, UninitializeApiImpl and XErrorReport.
The shims served only the first five. Without XErrorReport the thunks
refuse the runtime before they call any initializer: under gta6rt --run,
HCInitialize returned 0x89240101 (E_GAMERUNTIME_DLL_NOT_FOUND) and
curl_global_init returned CURLE_FAILED_INIT.
XErrorReport is now served by the function behind IXErrorImpl slot 3, so
a report reaches the XErrorSetCallback callback either way.
xgameruntime_test and the tiny_gdk_load fixture check all six names and
that a report through the export reaches the callback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested
Not covered: the GDK probe against the package's |
|
Verified the export change from I also compared two local startup runs on the same integration branch and Wine prefix, with the same experimental CPU-side XMem backing in both runs. Before this change the lookup of |
|
Tested The exe's runtime init looks up Windows 11 26200, AMD RX 9070 XT, MSVC 14.44, Windows SDK 10.0.26100, own Xbox 1.0.2.1 package (with AI-assisted (Claude Code). |
|
Tested on the retail engine Needed and confirmed. WinMain's xgameruntime.lib stub requires XErrorReport to resolve and otherwise returns 0x89240101 and hits an int3 (exe+0x5a91c21). With this PR: |
devnull34
left a comment
There was a problem hiding this comment.
Hardware & Environment
- Host: Windows 11 Build 26300 x64
- CPU/GPU: AMD Ryzen / AMD Radeon RX 7900 GRE (16 GB VRAM)
- Toolchain: MSVC 19.44 (Visual Studio 2022), CMake 4.4, Windows SDK 10.0.26100.0
Verification Summary
Targets compiled with MSVC 19.44 and verified natively:
-
**\xgameruntime_test.exe**:
- Passed with all 144 checks OK.
- Verified resolution of all six GDK thunk names (\InitializeApiImpl, \InitializeApiImplEx, \InitializeApiImplEx2, \QueryApiImpl, \UninitializeApiImpl, and \XErrorReport).
- Verified \XErrorReport\ export returns \S_OK\ and routes through to \XErrorSetCallback.
-
\ iny_gdk_load\ Fixture & \gta6rt\ Runner:
- Rebuilt \gta6rt.exe\ and ran
un_tiny_gdk_load\ test under runtime loader. - Dynamic command line matching and run-time module resolution with \XErrorReport\ verified.
- Rebuilt \gta6rt.exe\ and ran
-
CTest Suite:
- All 9 xgameruntime tests passed (100%):
- \xgameruntime: Passed (0.04s)
- \xgameruntime_user: Passed (0.01s)
- \xgameruntime_gamesave: Passed (0.03s)
- \xgameruntime_store: Passed (0.01s)
- \xgameruntime_offline: Passed (0.01s)
- \xgameruntime_offline_hdr: Passed (0.01s)
- \xgameruntime_user_gamertag: Passed (0.01s)
- \xgameruntime_user_gamertag_long: Passed (0.01s)
un_tiny_gdk_load: Passed (0.08s)
- All 9 xgameruntime tests passed (100%):
-
Hygiene & Compliance:
- Clean-room compliant: zero game data or proprietary files used or referenced.
- \git diff HEAD~1..HEAD --check: Clean (0 whitespace/formatting defects).
LGTM!
…(rebase of ItsNotRexed#5312) Author: Kam471 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkEUa9YfGQH4p9g1Guw9gq
|
Independent Windows + NVIDIA check of
I didn't run the GDK probe against the package DLLs, because that needs game files. |
|
Independent retail startup comparison on CachyOS x86-64, Wine 11.22, clang-cl 23.1.5/xwin 0.10.0 SDK 10.0.26100, Release, RTX 5070 Ti / NVIDIA 620.73.04. Tested offline on my local 1.0.2.1 package with Vulkan enabled.
On the combined TLS + memory build, the synthetic xmem (156 checks), loader TLS, tiny-game TLS and TLS clone cleanup tests passed. The /GA fixture's positive slot-zero checks pass, with the already-reported Wine failure in its missing-temp negative case. Outcomes only; all traces stayed local. AI-assisted (Codex). Follow-up: the runtime parts of #4348 at |
|
checked: #6582 | with: clang-cl cross build via xwin (ccache, ninja) + xgameruntime_test | on: wine-9.0 (Ubuntu 9.0~repack-4build3), PRETTY_NAME="Ubuntu 24.04.2 LTS", NAME="Ubuntu", main@867d922f0 + #6582 | result: merge with main CONFLICTED in docs/runtime_imports.md only (the paragraph listing the QueryApiImpl classes: main added XAccessibilityImpl and XLauncherImpl, the PR added XErrorReport); I resolved it in my scratch worktree by keeping both, the code files merged cleanly, so the PR needs a rebase on main. After that merge: xgameruntime_test OK (144 checks, 0 failures), including the new "GetProcAddress serves the six names" and "the XErrorReport export answers S_OK". Negative control: with runtime/shims/xgameruntime.cpp put back to main's, the test fails exactly those 2 checks (2 of 144 failed). Diff read against docs/runtime_imports.md and docs/retail_boot_chain.md (row 3 already names #6582): consistent, XErrorReport reuses IXErrorImpl slot 3 so the callback set by XErrorSetCallback still sees the report. No defect found. NOT tested: the claim that libHttpClient.GDK.dll HCInitialize returns 0x89240101 and XCurl curl_global_init fails without the name (needs the package DLLs, which I did not touch), and no run of the real executable. agent: yes |
|
✅ Automated security review: CLEAN (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
|
checked: #65824224c53 | with: clang-cl 23.1.5 + lld-link cross build against xwin SDK 10.0.26100 ( Audit: clean (audit tool exit 0) and the diff was read in full. Five files: Already in the integration main? The project's integration Merge-candidate check: with the code and test hunks applied to current The PR head I built is Not run: the retail executable (no game copy, and none should be used); the PR body's package-DLL measurement (libHttpClient.GDK agent: yes |
|
Tested with the retail exe on RTX 5080 together with #8379 on main 867d922: the boot gets past XErrorReport, xgameruntime initializes (InitializeApiImplEx2 ... offline), and the next stop is DStorageGetFactory (stop 5). Heads-up: on current main 6312c05 this PR now conflicts in runtime/shims/xgameruntime.cpp, not only in docs. |
|
Heads-up: the export itself landed directly on AI-assisted (Claude Code). agent: yes |
…icate XErrorReport; queue/Close diagnostics - rt::d3d12::console_title_leniency, set when D3D12XboxCreateDevice makes the strict proxy: dropped barriers/clears, A8_UNORM targets and UAVs, and images without unsupported storage usage apply only then, so the PC-validation tests keep the PC rules (6 had failed). - the upstream merge left two XErrorReport exports (upstream's and ItsNotRexed#6582's); upstream's stays. - Close says why it refuses a list; the console queue slots log their first words and the layout assumed (PresentX at 30 or 32). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LaugeM
left a comment
There was a problem hiding this comment.
As @pvfreis said, the export itself is on main since 6312c057f. Two more things decide what happens to this PR.
- The
xgameruntime.cppconflict is only the table line (:1335). The PR's definition afterGetApiVersionImpl(runtime/shims/xgameruntime.cpp:651-656) merges in without a conflict, next to main's copy at:252-255, in the same anonymous namespace. Resolving the table line alone leaves two bodies, and MSVC fails withC2084(I built the same resolution of #5312, which has the identical hunk). A rebase has to drop that definition too. - #5312 has since merged
main8575d36eitself. Itsdocs/runtime_imports.mdhunk merges cleanly with current main, and this PR's still conflicts in the class-list paragraph (:307in the merge). The two branches carry the same code and tests. @dracbat offered on #5312 to let either one close.
I'd close this one and land #5312 reduced to its tests, fixture and docs. docs/retail_boot_chain.md row 3 names this PR; it should cite 6312c057f instead. #9147 changes that row, and its review already points at the right commit.
AI-assisted review (Opus 5.5). Read the diff against main; ran git merge-tree of 4224c53 against upstream/main 5d74c27, and built the equivalent #5312 merge with MSVC 14.52 (C2084 with both definitions, ctest xgameruntime and run_tiny_gdk_load pass without the PR's copy).
…e of ItsNotRexed#5312) Squashed from ItsNotRexed#6582 by Kam471, head 4224c53 (security scan PASS). Conflict: docs/runtime_imports.md class list. Kept main's newer list (XAccessibilityImpl, XLauncherImpl) and the PR's XErrorReport sentence.
…function-local static guards in d3d12_xs, file_system and xgameruntime Squashed from ItsNotRexed#7957 by DevilNine, head b8c7363 (security scan PASS). Clean merge on top of ItsNotRexed#6582's XErrorReport and the Wave 0 static-guard PRs (ItsNotRexed#7175, ItsNotRexed#7198, ItsNotRexed#7359).
Rebase of #5312 for current
main(the original head is conflicting). Original author: @dracbat; authorship is preserved. BranchKam471:assist-5312-rebased, one commit on1cc6e3c12.xgameruntime.lib's thunksGetProcAddressXErrorReportfromxgameruntime.dll. Without it, the GDK clients refuse the runtime:HCInitialize(NULL)->0x89240101,curl_global_init(3)->2,curl_easy_init()-> NULL.Tested on the rebase base:
ctest -R '^xgameruntime': 8/8run_tiny_gdk_load: 1/1XErrorReportnon-NULL andS_OK;HCInitialize(NULL)= 0;curl_global_init(3)= 0;curl_easy_init()non-NULLgit diff --checkclean;git merge-treevs main exits 0.The only conflicts were main's newer class lists in
docs/runtime_imports.mdand the class-list comment; both are kept, with the XErrorReport text added.