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>
|
Independent Windows 11/MSVC 19.44 review at |
Kam471
left a comment
There was a problem hiding this comment.
Head efd4167d1. git diff --check clean.
- Configured with vcvars64 + Ninja:
cmake -G Ninja -S review-5312\runtime -B build-review-5312 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON -DLEONIDA_BUILD_WINDOWS_RUNTIME=ON -DVulkan_INCLUDE_DIR=C:/VulkanSDK/1.4.363.0/Include -DVulkan_LIBRARY=C:/VulkanSDK/1.4.363.0/Lib/vulkan-1.lib; builtxgameruntime_test,tiny_gdk_load,gta6rtand the otherxgameruntime_*_testtargets. LEONIDA_VK_DEVICE='RTX 5070 Ti' ctest -R "xgameruntime|run_tiny_gdk_load" --output-on-failure-> 9/9 passed.- Relevant lines:
PASS GetProcAddress serves the six names xgameruntime.lib looks up (five entry points and XErrorReport),PASS the XErrorReport export answers S_OK,run_tiny_gdk_load ... Passed. python -I tests/test_docs_env_vars.py/test_docs_links/test_docs_repo_paths/test_docs_table_rows/test_docs_table_ids/test_docs_design_rowsall OK;test_boot_traceOK;test_text_write_line_endingsOK.
Verdict: approve. XErrorReport is the same error_report function as IXErrorImpl slot 3, and both the export and the XErrorSetCallback path are covered.
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested efd4167 on NVIDIA GeForce RTX 4080, driver 617.42: xgameruntime_test exits 0 with "xgameruntime_test: OK (129 checks)". The log shows "xgameruntime: XErrorReport(0x80004005, export)" and, as a control, "loader: GetProcAddress(xgameruntime.dll, NoSuchRuntimeFunction): not served". The tiny_gdk_load run that covers the libHttpClient and XCurl init claims was not run. AI-assisted. |
|
Verified
Boot risk: closed for the measured six-name lookup on |
|
Tested efd4167 on Intel UHD Graphics 770, driver 32.0.101.7088, MSVC 19.44: xgameruntime_test, gta6rt and tiny_gdk_load build, and xgameruntime_test exits 0 with "xgameruntime_test: OK (129 checks)", including "PASS GetProcAddress serves the six names xgameruntime.lib looks up (five entry points and XErrorReport)", "PASS the XErrorReport export answers S_OK" and "PASS slot 3 is XErrorReport and reaches the callback slot 4 (XErrorSetCallback) set". ctest -R run_tiny_gdk_load passes (#52, "100% tests passed, 0 tests failed out of 1"); it prints no per-check lines. Neither test opens a Vulkan device, so the validation layer was not loaded. AI-assisted. |
|
Independent confirmation from an executable startup probe, AI-assisted with Codex. After applying #4313's TLS fix, a local Series Minecraft Preview executable exited with code 1 at its dynamic This local adaptation was initially tested independently of this PR: the direct-export negative control failed 1 of 107 checks before registration, and the updated test passed 108/108. I subsequently found this PR and integrated its regression changes from In the resulting integration, The useful discovery is that serving the COM error-report slot does not satisfy the thunk's named-export bootstrap contract. This PR removes an observed executable-startup blocker, in addition to the DLL-init evidence already in the description. Environment: Windows 11 build 26200, MSVC 14.51, Ninja RelWithDebInfo, NVIDIA RTX 5070 Ti / driver 617.14. Offline functional tests, no performance measurements, no game artifacts attached. |
Kam471
left a comment
There was a problem hiding this comment.
Independent confirmation from the package's own GDK clients (1.0.2.1; no game data):
libHttpClient.GDK.dllandXCurl.dllbothGetProcAddressexactly six names:QueryApiImpl,InitializeApiImpl,InitializeApiImplEx,InitializeApiImplEx2,XErrorReport,UninitializeApiImpl.- At main
561b65a83:XErrorReport-> NULL/127;HCInitialize(NULL)->0x89240101;curl_global_init(3)->2;curl_easy_init()-> NULL. - With this PR's fix:
XErrorReportresolves and returnsS_OK;HCInitialize-> 0;curl_global_init-> 0;curl_easy_init-> valid;ctest -R '^xgameruntime'8/8 andrun_tiny_gdk_loadpass. docs/runtime_imports.mdsays "five entry points"; both shipped clients require six. If this PR does not update that line, it should.
|
Rebased onto current
You can fast-forward/force-update your branch to this head, or cherry-pick it ( |
…(rebase of ItsNotRexed#5312) Author: Kam471 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkEUa9YfGQH4p9g1Guw9gq
Text conflicts only: xgameruntime.cpp's header comment keeps main's class list plus this branch's XErrorReport line; docs/runtime_imports.md keeps main's QueryApiImpl list plus this branch's XErrorReport sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged the latest
AI-assisted (Claude Code). |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested d1907dc (merged onto main 867d922) on RTX 5070, NVIDIA 621.24, Windows 11 (build 26200), Vulkan validation layer on (
Ran the tests that belong to the test files this PR changes (ctest entries, or the test program directly when it is not registered), with no game files ( |
|
✅ Automated security review: CLEAN (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
LaugeM
left a comment
There was a problem hiding this comment.
The export is on main now: 6312c057f adds XErrorReport(HRESULT, const char*) right after error_report (runtime/shims/xgameruntime.cpp:252-255 on main) and XGR(XErrorReport) to the table. What this PR still adds that main lacks is the tests, the tiny_gdk_load fixture, the library_loader.cpp comment and the docs. Main still says "five names" in all of those places. So I think this PR should be the one that lands, cut down to that part.
Resolving the conflict by keeping main's table line is not enough. The PR's own definition after GetApiVersionImpl (runtime/shims/xgameruntime.cpp:652-657 at d1907dc8d) merges in cleanly, and both definitions sit in the same anonymous namespace. I merged the head onto upstream/main 5d74c2723 and kept main's table line: MSVC 14.52 fails with C2084: function 'XErrorReport(HRESULT,const char *)' already has a body (line 662 against 257).
What the rebase needs:
- Drop the definition at
:652-657and theXGR(XErrorReport)line at:1336, and keep main's. - The header comment at
:66says "served below GetApiVersionImpl". That is wrong once main's copy is the only one. It sits next to IXErrorImpl slot 3 now. docs/runtime_imports.md:253still says "The executable is very likely linked the same way." The lookup is now measured on the retail executable:6312c057f's message and #8931 both report that itsXGameRuntimeInitializelooks up the same six names and asserts whenXErrorReportis missing. That sentence can say so, without the addresses.docs/retail_boot_chain.mddeliberately quotes none.- Optional: #8931's
xgameruntime_testcheck also compares the message string the callback receives through the export. Yours only checks the HRESULT (runtime/test/fixtures/tiny_gdk_load.cpp:124) andS_OK(xgameruntime_test.cpp:305). It is worth taking over when #8931 closes.
With the two hunks dropped and the comment fixed, xgameruntime_test, tiny_gdk_load and gta6rt build, and ctest -R "^xgameruntime$" and run_tiny_gdk_load pass.
#6582 is a rebase of an older state of this branch. Its docs hunk conflicts with main and yours doesn't, so this is the one to keep.
AI-assisted review (Opus 5.5). Read the diff against main; merged d1907dc onto upstream/main 5d74c27, built xgameruntime_test, tiny_gdk_load and gta6rt with MSVC 14.52 (Windows 11), and ran ctest xgameruntime and run_tiny_gdk_load, which pass once the duplicate definition is removed.
|
Tested
Since this run, No game files. AI-assisted (Claude). |
…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.
Claimed in the coordination issue as: #5256 (comment)
What and why
libHttpClient.GDK.dllandXCurl.dllreach the GDK runtime throughxgameruntime.lib's thunks. They callLoadLibraryW("xgameruntime.dll"), thenGetProcAddressforInitializeApiImpl,InitializeApiImplEx,InitializeApiImplEx2,QueryApiImpl,UninitializeApiImplandXErrorReport. In both DLLs the last name sits in the same block of strings as the other five, but the shim registry served only the five entry points.When the
XErrorReportlookup fails, the thunks refuse the runtime before they call any initializer. Throughgta6rt --run:HCInitialize(nullptr)returned0x89240101(E_GAMERUNTIME_DLL_NOT_FOUND);curl_global_init(CURL_GLOBAL_ALL)returnedCURLE_FAILED_INIT;[rt] loader: GetProcAddress(xgameruntime.dll, XErrorReport): not servedline and noInitializeApiImplEx2call.A title that starts either library at boot hits this on its first networking init.
This PR serves
xgameruntime.dll!XErrorReport(HRESULT, const char*)with the function that already implementsIXErrorImplslot 3, so a report through either path reaches the callbackXErrorSetCallbackset. With it:HCInitializereturnsS_OK, andHCIsInitializedstays true untilHCCleanup;curl_global_init,curl_easy_init,curl_easy_cleanupandcurl_global_cleanupsucceed;InitializeApiImplEx2).docs/runtime_imports.mdnow lists the sixth name and the measured failure. It also notes thatcurl_global_initasksgameplatformservices.dllforInitializeApiImpl, which isn't served; the call succeeds without it.Regression tests:
xgameruntime_testchecks thatGetProcAddressserves all six names and that the export answersS_OK.tiny_gdk_load(ctestrun_tiny_gdk_load, throughgta6rt --run) looks up all six, and checks that a report through the export reaches theXErrorSetCallbackcallback.It touches the same file as #3963 (the
XErrorSetCallbackpair), on different lines.Tested
Windows 11, AMD Radeon RX 5700 (RDNA1), AMD driver 32.0.21045.29003 (Vulkan 1.4.315), MSVC 14.44 (VS 2022 17.14), Vulkan SDK 1.4.363.1, CMake 4.4.5, Ninja 1.13.2. RelWithDebInfo with SDL3 fetched, on
main3faac55.ctest -j 2without the three window tests: 174/175 passed, 9 skipped. The one failure,run_tiny_frame, passed alone twice. It was the exit race process shim: the game thread that ends a run no longer exits the process before gta6rt finishes #4043 fixes: exit code 0, with gta6rt's stdout cut after the first character ofgame exited with code 0. This change doesn't touchprocess.cpp.xgameruntime,run_tiny_gdk_load, the otherxgameruntime_*andrun_tiny_*tests,loaderandwinhttp_offlinepass.gta6rt --run --game-dir <game> --trace FILE --trace-d3d12loads the two DLLs and calls their public init entry points.main,HCInitializereturns0x89240101andcurl_global_initreturns 2.DllMainTRUE, no exception and no unimplemented call.python -I tests/test_docs_*.py,tests/test_boot_trace.pyandtests/test_text_write_line_endings.pypass.AI-assisted: yes (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (N/A: no translator change.)🤖 Generated with Claude Code