Summary
Heap/VirtualAlloc allocations, dropped-file handles, and other process state persist across runs within a single emulation. This is defensible as same-process modeling, but it means "invoke every export" (all_entrypoints=True) is not a clean per-export probe — it is a single, accreting process, and later exports observe earlier exports' allocations and globals.
Impact
Analysts and library users can misread multi-export reports as independent per-export results. Combined with the CPU-register and stack bleed issues, the cross-run coupling is stronger than expected.
Proposed resolution (obvious — primarily documentation)
Document the semantics explicitly in doc/reporting.md and doc/library.md: runs share process-global memory by design, and (after the register/stack-reset fixes) CPU/thread context is reset per run while process memory is not. If a clean per-export probe is desired, that would be a separate opt-in feature (fresh process state per run).
Testing / validation
N/A for the documentation change. If an opt-in "isolate runs" mode is later added: allocate in run 1, assert the allocation is absent at the start of run 2 under the isolation flag.
Found during the architecture review on branch claude/windows-emulator-architecture-qvaabb.
Summary
Heap/
VirtualAllocallocations, dropped-file handles, and other process state persist across runs within a single emulation. This is defensible as same-process modeling, but it means "invoke every export" (all_entrypoints=True) is not a clean per-export probe — it is a single, accreting process, and later exports observe earlier exports' allocations and globals.Impact
Analysts and library users can misread multi-export reports as independent per-export results. Combined with the CPU-register and stack bleed issues, the cross-run coupling is stronger than expected.
Proposed resolution (obvious — primarily documentation)
Document the semantics explicitly in
doc/reporting.mdanddoc/library.md: runs share process-global memory by design, and (after the register/stack-reset fixes) CPU/thread context is reset per run while process memory is not. If a clean per-export probe is desired, that would be a separate opt-in feature (fresh process state per run).Testing / validation
N/A for the documentation change. If an opt-in "isolate runs" mode is later added: allocate in run 1, assert the allocation is absent at the start of run 2 under the isolation flag.
Found during the architecture review on branch
claude/windows-emulator-architecture-qvaabb.