Skip to content

Avoid redirected USERPROFILE daemon trap - #593

Merged
coneilen merged 2 commits into
mainfrom
coneilen-microsoft-diagnose-redirected-userprofile-daemon-c
Oct 2, 2026
Merged

coneilen merged 2 commits into
mainfrom
coneilen-microsoft-diagnose-redirected-userprofile-daemon-c

Conversation

@coneilen

@coneilen coneilen commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prevents graphcoded.exe from trapping when USERPROFILE is redirected by handling an empty Foundation application-support lookup. Fixes #558.

Changes

  • Fall back to the configured default support directory when Foundation returns no legacy application-support directory.
  • Add injected Windows and macOS unit coverage for the empty lookup.
  • Add a production direct-process regression that redirects only USERPROFILE, uses explicit owned support and temp directories, and verifies clean startup and shutdown.

Test plan

RED: pwsh -NoProfile -File Tools\windows\Tests\RedirectedUserProfileDaemon.Tests.ps1 -DaemonExecutable .build\issue-558\release\graphcoded.exe -ScratchRoot .build\issue-558\red -> graphcoded.exe shutdown returned 0xC000001D
GREEN: pwsh -NoProfile -File Tools\windows\Tests\RedirectedUserProfileDaemon.Tests.ps1 -DaemonExecutable .build\x86_64-unknown-windows-msvc\release\graphcoded.exe -ScratchRoot C:\gc-issue-558\final-green -> redirected profile daemon passed with exit 0x00000000
REGRESSION: pwsh -NoProfile -File Tools\windows\validate.ps1 -Task swift-production -SwiftExecutable C:\Users\coneilen\AppData\Local\Programs\Swift\Toolchains\6.3.3+Asserts\usr\bin\swift.exe -> 101 XCTest and 6 Swift Testing cases, release builds, direct-process regression, and clean runtime smoke passed

pwsh -NoProfile -File Tools\windows\validate.ps1 -Task swift-format -SwiftExecutable C:\Users\coneilen\AppData\Local\Programs\Swift\Toolchains\6.3.3+Asserts\usr\bin\swift.exe passed.

The shared macOS path was not executed locally on Windows. Exact-head macOS shared CI is required before merge.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

coneilen and others added 2 commits October 1, 2026 23:13
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
@coneilen
coneilen force-pushed the coneilen-microsoft-diagnose-redirected-userprofile-daemon-c branch from 3a2fe81 to 285b73e Compare October 2, 2026 06:16
@coneilen
coneilen merged commit ca535d0 into main Oct 2, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

graphcoded.exe crashes silently (0xC000001D) when USERPROFILE is redirected on Windows

1 participant