On Windows 11 26200, check_child_runner() previously ran one successful
CreateProcessW and one failed CreateProcessW before recording handles_before.
However, NtQueryObject shows that the second successful CreateProcessW still
opens and caches one persistent HKCU registry key handle (\REGISTRY\USER\<SID>)
in the parent process before stabilizing at +0 handles on the third and later
calls. That caused `handles_after == handles_before` (e.g. 123 vs 124 under
ctest) to abort queue_proxy_test before testing WARP, hardware D3D12, or
Vulkan queue/fence proxies.
Warm up two successful `run_self(L"--child-flood 0", 30000)` starts before
recording `handles_before`, while keeping the strict `handles_after == handles_before`
handle-leak assertion intact.
AI-assisted with Argon (Antigravity).
Differential error and argument validation cases that do not alter device
residency, touch the sharing subsystem, or fault on the PC runtime are now
executed in-process directly against the backend's devices. Cases modifying
residency (1, 2, 26..29), creating shared handles (30, 31), or faulting under
SEH on the host runtime (17..20, 25) remain isolated in child processes.
LEONIDA_QUEUE_PROXY_ISOLATE_ALL=1 is supported as an override to force all
cases into child processes.
Tested on Windows 11 with MSVC 19.51, NVIDIA GeForce RTX 3060 (WARP + hardware
+ Vulkan backends): execution time drops significantly with zero leaks and 3
backends passing cleanly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each differential case starts two child processes (real object, proxy), and
each child pays its own device start-up: ~5 s on an AMD RDNA2 iGPU, 97 s per
ctest run. The children now run differential_jobs() at a time (half the
logical processors, 1..8; LEONIDA_QUEUE_PROXY_JOBS overrides, 1 = serial)
and are judged afterwards in case order, so the report is unchanged.
Starting children from several threads needs the pipe's write end to be
inheritable only for its own CreateProcessW: both ends are now created
uninheritable and the write end is made inheritable under a start lock, so
a sibling started meanwhile can't inherit it and hold the pipe open.
RX 9070 (WARP + hardware + Vulkan backends): 44 s -> 20 s, same output;
5 runs at 16 jobs clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Device slots 8 (CreateCommandQueue), 75 (CreateCommandQueue1), 36
(CreateFence) and 32 (OpenSharedHandle of a fence) now return queue and
fence proxies. They forward the public chain in PC order (19 queue slots,
11 or 12 fence slots), refuse and log a slot past it up to the end of the
proxy's table, and name a read past the table through a guard region and
a vectored handler.
Heap, queue and fence proxies are unwrapped wherever a device or queue
method hands them to the real runtime: queue Signal/Wait, device slots
31/34/35/45/46/50. Arrays are copied without exceptions. QueryInterface
answers only the modelled interfaces, and logs one the real object has
but the proxy does not model. Outputs are cleared on failure as for
slots 14/62/76. --trace-d3d12 records proxy calls in the README grammar.
Every function a thunk hands its words to keeps them in the same
positions, because a title passes only as many as the method takes.
Tests: queue_proxy_test (host WARP, host hardware, Vulkan device;
differential per-process error cases, guard faults, identity, threads,
raw-slot client, child-runner self-test), xs_proxy_mock_test (older
devices, fences without Fence1, OpenSharedHandle branches, allocation
failures; three guard-setup fault modes), and device_proxy_test through
the D3D12XboxCreateDevice shim. No game files.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>