runtime: export XMemTransferMemory with an explicit desktop refusal #984
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!984
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/984/head"
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?
@Holastor on GitHub · 2026-11-23 19:49 UTC · original
Holastor:xmem/transfer-runtime-export→main· +146 −3 · 5 files · 1 commits · merged 2026-11-23 20:22 UTCExport
XMemTransferMemoryfromxmem.dll(assigned ordinal@13) with a narrow desktop refusal semantics and verification of state preservation.Following the merged prerequisite and failure-chain fixtures (#935 and #955), this runtime export resolves the missing import (
xmem.dll!XMemTransferMemory) identified during runtime import binding preflight in #870.Behavior
XMemIsToolsMemAvailable() == FALSEper #896), returnsFALSEwithERROR_NOT_SUPPORTED(50).ERROR_INVALID_PARAMETER(87), all calls take this narrow refusal. Never reports unbacked ownership transfer.XMemTransferMemoryunder existing caller sequences (including partition 1, 2 MiB / 16 MiB counts, and variant inputs) leaves heap allocations, GPU graphics allocations,era_queryregistration, physical page grants, tools memory status, and working-set statistics untouched.XMemTransferMemory @13insrc/xmem_shim.def.Verification
Release build:
Documentation and hygiene checks:
All passed.
Refs #870.
@R0Y00 on GitHub · 2026-11-23 19:57 UTC · original
Thanks for keeping the no-tools path a real refusal. #935 and #955 establish the recorder's inputs and the caller's failure path. They do not establish partition 1, 2 MiB alignment, or the 16 MiB cap as runtime validation rules. Please cite independent evidence for any input that must return 87. With only the current evidence, use a narrow desktop refusal and verify it leaves memory/accounting unchanged under the existing caller sequence. Also distinguish a resolved import that refuses transfer from evidence that the startup path can proceed past the call.
@Holastor on GitHub · 2026-11-23 20:06 UTC · original
Thanks @R0Y00, that makes total sense. Updated in commit
88e454d:Narrow desktop refusal:
ERROR_INVALID_PARAMETER(87), as #935 and #955 establish the recorder's inputs and failure paths rather than production runtime parameter validation rules.XMemTransferMemoryunconditionally setsERROR_NOT_SUPPORTEDand returnsFALSE.Memory and accounting preservation verification:
tests/xmem_shim_check.cpp(xmem_shim_transfer_memory) to verify that callingXMemTransferMemoryacross existing caller sequences (including partition 1, 2 MiB and 16 MiB counts, as well as variant inputs) leaves:era_queryintact with unmodified bytes;FALSE);Distinguishing import resolution from startup progression:
docs/experiments.mdand the PR summary to explicitly distinguish that resolving the missing export allows PE import binding to succeed at load time (clearing the status 5 unresolved import), but does not establish that the startup path can proceed past an unsupported transfer.Both
devandreleasepresets build and pass 12/12xmem_shim_*tests locally, and all repository hygiene checks pass.@Jess-Doit on GitHub · 2026-11-23 20:14 UTC · original
Independent Windows 10 check of
88e454d(22H2 19045.6456, MSVC 19.44 x64, Release). Eight focused XMem tests passed, includingxmem_shim_transfer_memoryandxmem_shim_mapped_pages.The same binding-only probe as the #870 checkpoint bound 217 imports in two runs and stopped with status 5 at
d3d12_xs.dll!D3D12ConfigureVirtualMemoryX. Withholding onlyXMemTransferMemoryreproduced the prior 174-import stop at that name. The probe stops at import binding, before executable initialization or calling the transfer function.AI-assisted (Codex).