mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:50:52 +01:00
[PR #1466] test: spawn pipeline library host steps without a command shell #1495
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1495
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1466
Author: @whoalin1
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:plh-crash-fix📝 Commits (1)
cf72805test: spawn pipeline library host steps without a command shell📊 Changes
1 file changed (+87 additions, -9 deletions)
View changed files
📝
runtime/test/d3d12_pipeline_library_host_test.cpp(+87 -9)📄 Description
Claimed in the coordination issue: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148908675
What
d3d12_pipeline_library_host_testran each host step through_popen, which resolves the command shell viaCOMSPECand a PATH search forcmd.exe— and the UCRT fast-fails the calling process (0xc0000409) when neither finds one. Shells with a stripped environment (agent shells, or ctest inheriting one withoutSystem32on PATH) crashed the whole test at the first host step in ~0.7 s, whilecmd.exepassed. GPU-independent; reproduced identically on RTX 4070 SUPER and AMD iGPU paths.Repro: a 15-line
_popen("whoami.exe","r")program crashes with 0xc0000409 under the stripped env; adding onlyComSpecor onlySystem32to PATH each make it pass.Fix: spawn the
--host-stepchild withCreateProcessA+ anonymous pipe (CreatePipe,STARTF_USESTDHANDLES, drainReadFileuntil EOF, thenWaitForSingleObject— correct order, no pipe deadlock). No shell is involved, so no environment can fast-fail the test.CREATE_NO_WINDOWincluded.Spawn/infrastructure failures (CreatePipe/CreateProcessA/ReadFile/WaitForSingleObject) now return a
kNoChildsentinel — the same pattern asd3d12_residency_test.cpp— that fails the comparison withGetLastErrordiagnostics, instead of the oldkFaultedpath that could have produced a vacuous0 steps compared, 0 mismatchespass.Tested
ctest -R d3d12_pipeline_library_hostunder the previously-crashing stripped env (no COMSPEC, PATH without System32): Passed, 10.85 s (was 0.74 s crash).72 steps compared with the host (22 more not compared), 0 mismatches, identical to the cmd.exe baseline.GetLastError 2diagnostics — not a vacuous pass.AI-assisted (Devin).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.