runtime: refuse forwarding an offline store context to desktop methods #1592
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1599"
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 R0Y00/Xbox2Windows. Originally posted by SuperCraft3M on 2026-11-24T14:44:32Z.
Change
An unimplemented store operation can forward the offline context token created by the fake-user proxy to the desktop gaming runtime. The token is not a desktop runtime object, and a local diagnostic run faults when that runtime dereferences it.
Refuse unhandled calls carrying the known offline store token in any of the first four arguments with E_FAIL, before invoking the desktop method. This follows the existing synthetic-user forwarding guard and leaves typed handled operations in control of their own result. No store operation is newly implemented.
Verification
Main base
be484d0f, patchab913560, Windows 11 / MSVC 19.44 Debug.cmake --build C:/Xbox2Windows-build --target startup_stub_consumer --parallel 4: passed.ctest --test-dir C:/Xbox2Windows-build --no-tests=error -R '^startup_stubs$' --output-on-failure: passed 1/1, no skips, with TEMP/TMP set to C:/Xbox2Windows-build/test-temp (the fixture's ASCII log reader cannot read a non-ASCII temporary path).The source-built store-context check now installs a sentinel desktop method. It requires E_FAIL for the token in each of the first four positions; a different value must still reach the sentinel. Existing creation, mutated-provider, foreign-user and invalid-output checks remain.
Evidence and limits
A private diagnostic run exposed a desktop-runtime fault after offline context creation; raw logs, pointers, binaries and captures are not attached. The public fixture verifies the forwarding boundary. It does not validate complete startup or store services. Original contribution under MIT. Reproduction is in docs/experiments.md.
AI-assisted (Codex).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T15:01:28Z.
Review: COMMENTED
Reviewed
ab913560(src/startup_stubs/runtime_proxy.cpp,docs/experiments.md).Findings
forward<N>, checkingargs[0..3]againststore_context_handleaftersave_call/area_calland before thelocal_user_handleguard ensures any unimplementedN >= 3method (including store methods beyond slot 3) returnsE_FAIL(0x80004005) instead of forwarding the synthetic token to the desktop vtable.store_method3_check()verifies all four argument positions return0x80004005while a non-matching token (context ^ 1) still reaches the mock desktop method (0x1234).Verification
python3 tests/docs_links_check.py: passed (16 Markdown files, 346 links).python3 tests/bidi_controls_check.py: passed (1255 tracked files)./O2):ctest --preset dev -R '^(startup_gameinput_keys|startup_storage_directory_batch|startup_stubs)$' --parallel 4 --no-tests=error --output-on-failure: 3/3 passed (0.60s).ctest --preset release -R '^(startup_gameinput_keys|startup_storage_directory_batch|startup_stubs)$' --parallel 4 --no-tests=error --output-on-failure: 3/3 passed (0.53s).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T15:07:24Z.
Resolved the docs conflict at
ae21de70and kept both the offline forwarding and UTF-8 storage notes. The documented build now lists the DLL targets that the full startup_stubs fixture loads. Windows Release passed startup_stubs, startup_storage_root and its separator control (3/3), and the docs check passed all 348 links.