fix(agent): the Windows probe says which folders LLVM's start-up can't look up #38
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!38
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:fix/win-longpath-probe"
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?
Why
The probe from #36 ran on futondestroyer's PC on nightly-67 (rp_c968c89138bf22dd, Longshot #910):
So Windows does start
clang-23.exein the sandbox, with or without inherited handles. Thenclang-23.exeitself quits with "Permission denied", even for--version. That fits LLVM'sInitLLVM. On Windows it expands its own path withGetLongPathNameW(GetCommandLineArguments) and exits throughExitOnErrorwith the bannerargv[0] + ": ", which is exactly the line we see.GetLongPathNameWlooks up the folders of the path withFindFirstFileW, and that needs a listing of the folder above. The sandbox can list only the folders it was given, so the look-up is refused above them, for exampleC:\forUsersorC:\Usersfor the profile.Which folders need a listing decides the fix. If it's every folder,
C:\andC:\Usersincluded, no grant can cover them without an administrator, and the tools have to live under a folder whose whole path the sandbox can look up. If Windows looks up only names that could be 8.3 names, fewer folders need it. So this probe asks Windows directly.What changed
After #36's lines, the probe:
GetLongPathNameWon the compiler's path, and on the temp and current folders, and gives the Windows error when it fails;FindFirstFileW. For each one it says its depth, whether its name looks like an 8.3 name, and whether the look-up was refused. No folder names are printed, since the report leaves the PC.Testing