runtime: define the memory-transfer contract for startup #935
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!935
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/935/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 17:52 UTC · original
Holastor:xmem/transfer-memory-contract-fixture→main· +466 −0 · 6 files · 2 commits · merged 2026-11-23 18:19 UTCSummary
Establishes the source-built contract fixture for
xmem.dll!XMemTransferMemoryfollowing the slice claim on #870 and the pattern from #902.Fixture and Controls
tests/cpu/transfer_mem_caller.asm):tests/cpu/exe_startup.asmand callsfinish_exefromcpu_exe_io.dll.rcx = 1,rdx = 0x200000), verifying return value1.rcx = 1,rdx = 0x1000000), verifying return value1.rcx = 0), returning0.rdx = 0), returning0.rdx = 0x200100), returning0.rdx = 0x2000000), returning0.tests/cpu/transfer_mem_provider.cpp):recorded_partition,recorded_bytes).tests/cpu/transfer_mem_check.py):CPU_CRC_TEST_LIVE_WORKER=1(clean exit with code0x870).tools/pe_map.cpp(clean host return with code0x870).pe_mapstops before entry withSTATUS["unresolved"]namingxmem.dll!XMemTransferMemory.Verification
Observed: 1/1 passed in dev (0.17s) and 1/1 passed in release (0.16s). All linters passed.
Refs #870
@R0Y00 on GitHub · 2026-11-23 17:56 UTC · original
The six source-built calls and missing-export control give us a good recorder starting point. I found a gap in the trace assertion: the provider keeps only the most recent accepted arguments, so changing the first 2 MiB request to 4 MiB still satisfies both counters and the final 16 MiB check. Could you record and compare all six ordered argument pairs, including the rejected calls, and add that changed-first-call control? Please also label selector 1, alignment, maximum and BOOL as test-provider policy throughout. The fixture should leave the native transfer and partition effect open.
@Holastor on GitHub · 2026-11-23 18:03 UTC · original
Updated in
51ad45b:transfer_mem_provider.cppnow records all six calls in sequence (CallRecord { partition, bytes, result }), capturing both accepted and rejected requests.transfer_mem_check.pyverifies all six ordered pairs and outcomes against expected values:0x200000), result 10x1000000), result 10x200000), result 00x200100, result 00x2000000, result 00xF0B, and the recorded trace verifies 4 MiB in call 0.BOOLreturn semantics are explicitly labeled as test-provider policy throughouttransfer_mem_provider.cpp,transfer_mem_check.py, anddocs/experiments.md. Native console transfer semantics and partition effects remain open.