Repository navigation
Conversation
ca79b01 to
1257c48
Compare
|
Self-review against Microsoft's reference pages for all six slots (after @Flyander caught a parameter-order slip in #2169). Slots 3-6 match: three |
Flyander
left a comment
There was a problem hiding this comment.
I found two contract gaps at the current head:
-
Sandbox buffer size: slot 4 calls
copy_idwithsizeof("RETAIL")(7), so buffers of 7–15 bytes returnS_OK. Microsoft's contract requiressandboxIdSize >= XSystemXboxLiveSandboxIdMaxBytes(16) and returnsERROR_INSUFFICIENT_BUFFERbelow that. Please validate against the API minimum and cover a short buffer; the current test uses only 64 bytes. Microsoft reference -
Inherited interface IDs:
object_query_interfaceaccepts onlyclass_idandnewer_iid, but the served interface isIXSystemImpl5, whose IDL inheritance chain isIXSystemImpl5 : IXSystemImpl4 : IXSystemImpl3 : IXSystemImpl2 : IXSystemImpl. Calls for the intermediate IIDs therefore returnE_NOINTERFACEeven though the object exposes the derived interface. Please include the inherited IIDs in its QueryInterface map and exercise the chain. IDL
I reviewed this statically and did not run tests.
5a2166c to
1ab9ac7
Compare
|
Tested 5a2166c on an NVIDIA GeForce RTX 3050 Laptop GPU, driver 32.0.16.2101, Windows 11, native MSVC (VS 2022 Build Tools, Ninja, RelWithDebInfo), with
AI-assisted (Claude Code). |
Flyander
left a comment
There was a problem hiding this comment.
The two findings from my prior review remain at 1ab9ac7:
sys_sandbox_idstill checks the caller's capacity againstsizeof("RETAIL")(7), so buffers of 7–15 bytes incorrectly succeed. Microsoft requiresXSystemXboxLiveSandboxIdMaxBytes(16), andsandboxIdUsedis a required output.QueryInterfacestill rejects the inheritedIXSystemImpl2,IXSystemImpl3andIXSystemImpl4IIDs for thisIXSystemImpl5object.
There is also a distinct null-output bug: sandboxIdUsed == nullptr is accepted and the call can return S_OK; the export contract requires that output pointer.
Please enforce both required output capacities/pointers and expose the inherited interface IIDs before merge.
|
@Flyander thanks, both fixed in 93e6513.
|
Flyander
left a comment
There was a problem hiding this comment.
Re-reviewed at 93e6513. The 16-byte minimum and inherited IXSystem IIDs are now covered. Correction to my previous review: Microsoft documents sandboxIdUsed as Out_opt, so accepting null there is valid. No remaining concrete issue found in this change. https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/system/xsystem/functions/xsystemgetxboxlivesandboxid?view=gdk-2604
|
Tested 1ab9ac7 on Tiger Lake (Xe-LP) iGPU 0x9a78 (Intel(R) UHD Graphics, driver 32.0.101.7088), Windows 11, MSVC 14.44: pass Stack note: this head is Built with MSVC 14.44 and Vulkan SDK 1.4.363.0 (RelWithDebInfo). Coverage note: the translated-shader GPU tests and d3d12_subgroup_test are not built on this machine (no llvm-mc with the AMDGPU target); gameinput disabled (no SDL3). Full ctest: 105/107 pass, 2 failures:
The PR's own area, run separately ( AI-assisted (GLM, operated by the account owner). |
…ApiImpl libHttpClient.GDK.dll asks QueryApiImpl for XSystemImpl with IXSystemImpl5's interface id and calls slots 3-8 (thunks disassembled, no code run): three (size, buffer, used) id queries, then two pointers, one pointer and a bool: xgameruntime-docs' IXSystemImpl list (console id, Xbox Live sandbox id, app-specific device id), IXSystemImpl3's (XSystemHandleTrack, XSystemIsHandleValid) and IXSystemImpl4's (XSystemAllowFullDownloadBandwidth), IXSystemImpl2 and 5 adding no known method. Offline answers: the existing 39-byte console-id placeholder, sandbox RETAIL, a 45-byte app-specific device-id placeholder (short buffers get ERROR_INSUFFICIENT_BUFFER, null E_INVALIDARG), handle tracking accepted and never called back, a non-null handle valid, bandwidth S_OK. docs/runtime_imports.md: libHttpClient calls five classes through thunks (not only an id table, as the table said): their slot ranges, with the XSystemImpl and XPackageImpl rows. xgameruntime_test +5 checks (74). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…loadBandwidth void Checked against Microsoft's reference pages: bool XSystemIsHandleValid( XSystemHandle) and void XSystemAllowFullDownloadBandwidth(bool). Slot 7 returned an HRESULT, so S_OK (0) read as "not valid" to a conforming caller. The test calls both with the documented types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…x id needs 16 bytes Review (@Flyander): - QueryInterface accepted the class id and IXSystemImpl5 only. The IDL chain is IXSystemImpl5 : IXSystemImpl4 : IXSystemImpl3 : IXSystemImpl2 : IXSystemImpl (xgameruntime include/xsystem.idl), so every one of them is served by the same vtable. RuntimeObject now carries a null-terminated list of interface ids instead of one newer id (XNetworkingImpl's list is IXNetworkingImpl2). - XSystemGetXboxLiveSandboxId requires sandboxIdSize >= XSystemXboxLiveSandboxIdMaxBytes (16); buffers of 7-15 bytes returned S_OK. copy_id takes the API minimum. Tests: a 15-byte sandbox buffer is refused, 16 accepted; all five IXSystemImpl ids give the same object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
93e6513 to
418778f
Compare
|
This landed on |
Claimed on #2078: #2078 (comment)
Depends on #2169 (XNetworkingImpl): it's stacked on that branch, because both add an object to
QueryApiImpl's list andRuntimeObject's optional newer interface id. This PR's own change is the top commit.What and why
libHttpClient.GDK.dllasksQueryApiImplforXSystemImpl(e349bd1a-…) withIXSystemImpl5's interface id (1861cf2e-…), through 6 thunks calling slots 3–8. I measured them the same way as #1877, disassembling the package's own DLL without running code. Each slot's argument shape matches the method at that position of xgameruntime-docs' lists:XSystemGetConsoleId(IXSystemImpl)XSystemGetXboxLiveSandboxIdXSystemGetAppSpecificDeviceIdXSystemHandleTrack(IXSystemImpl3)XSystemIsHandleValidXSystemAllowFullDownloadBandwidth(IXSystemImpl4)IXSystemImpl2 and IXSystemImpl5 add no known method, which is consistent with nothing being called past slot 8.
The change
A 9-slot
XSystemImplwith offline answers:RETAIL;XSystemAppSpecificDeviceIdBytes); a short buffer getsERROR_INSUFFICIENT_BUFFERand a null oneE_INVALIDARG, as the console-id query already does;docs/runtime_imports.md: the class table said libHttpClient's 24 class GUIDs look like "a linked id table rather than of use". In fact five classes are called through thunks:XThreadingImpl(27 thunks),XPackageImpl(30),XNetworkingImpl(18),XSystemImpl(6) andXErrorImpl(3). The measured table gainsXSystemImplandXPackageImplrows;XPackageImpluses slots 3–40 ofIXPackageImpl3and isn't served yet. The networking row notes that libHttpClient calls all of 3–20.Tests
xgameruntime_test(+5, 74 total) checks the IXSystemImpl5 id, the three id queries with sizes and refusals, and slots 6–8.ctest -R "xgameruntime|tiny_gdk|loader": 6/6, Windows 11 / MSVC.Disclosure: written with an AI assistant (Claude Code). I reviewed it and ran the tests above.
🤖 Generated with Claude Code