fix(libkernel_sys): create symlinks with CreateSymbolicLinkW on Windows #3510

Merged
babyhuey merged 1 commit from upstream-pr/3510 into main 2026-10-11 19:45:53 +00:00
babyhuey commented 2026-10-11 12:04:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T12:04:07Z.


What

Follow-up to #3491, which merged at its first head. Windows changes in libkernel_sys:

  • symlink creates links with CreateSymbolicLinkW and SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (plus SYMBOLIC_LINK_FLAG_DIRECTORY when the target is an existing directory). ERROR_PRIVILEGE_NOT_HELD gives EPERM, ERROR_ALREADY_EXISTS/ERROR_FILE_EXISTS give EEXIST, ERROR_PATH_NOT_FOUND gives ENOENT, and any other error throws.
  • symlink checks for an existing name with GetFileAttributesW, which also sees a dangling link.
  • readlink on a path with FILE_ATTRIBUTE_REPARSE_POINT throws (NotImplemented), the way lstat does since #2898, instead of returning EINVAL for a real link.

Linux is unchanged: it keeps std::filesystem.

Why

MinGW's libstdc++ (WinLibs GCC 15.2) can't create or read Windows symbolic links: std::filesystem::create_symlink and read_symlink return ENOSYS, and symlink_status reports a new link as a regular file. So on main every symlink call on Windows throws and guest_kernel_sys aborts:

[libc] unhandled exception 'St12system_error'
  what():  symlink: Function not implemented

The first head of this PR fixed creation only. With Developer Mode on, @screamm and @santhoshkumar-dev found the test still failed after a real link was created, because symlink_status and read_symlink don't see Windows links; @Amoenus confirmed it 5/5. This head follows screamm's suggestions. On Windows the test checks the new links through FILE_ATTRIBUTE_REPARSE_POINT and EEXIST on a second create, without readlink. Reading a Windows link's target back (FSCTL_GET_REPARSE_POINT) is left for a later change, so readlink throws there for now.

Tested

This head (6aa0b4fb):

  • Linux (Ubuntu 24.04, GCC 13), Release: guest_kernel_sys passes 5/5 (--repeat until-fail:5), including the full round trip through readlink.
  • Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release, Developer Mode off: 5/5, no warnings; symlink returns EPERM and the test skips the success cases (also run by @Silverash-i8).
  • Windows 11 with link creation allowed: 5/5 serial runs by @Amoenus, through the creation, EEXIST and dangling-link cases.
  • Windows 11 Pro with Developer Mode on, merged onto main a11c8f7f: 5/5 by @screamm, through the same cases.
  • On main 1e8fff68, guest_kernel_sys aborts on Windows with the error above.

check_conventions.py passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4818910724 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-11T12:04:07Z. --- ### What Follow-up to #3491, which merged at its first head. Windows changes in libkernel_sys: - `symlink` creates links with `CreateSymbolicLinkW` and `SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE` (plus `SYMBOLIC_LINK_FLAG_DIRECTORY` when the target is an existing directory). `ERROR_PRIVILEGE_NOT_HELD` gives `EPERM`, `ERROR_ALREADY_EXISTS`/`ERROR_FILE_EXISTS` give `EEXIST`, `ERROR_PATH_NOT_FOUND` gives `ENOENT`, and any other error throws. - `symlink` checks for an existing name with `GetFileAttributesW`, which also sees a dangling link. - `readlink` on a path with `FILE_ATTRIBUTE_REPARSE_POINT` throws (`NotImplemented`), the way `lstat` does since #2898, instead of returning `EINVAL` for a real link. Linux is unchanged: it keeps `std::filesystem`. ### Why MinGW's libstdc++ (WinLibs GCC 15.2) can't create or read Windows symbolic links: `std::filesystem::create_symlink` and `read_symlink` return `ENOSYS`, and `symlink_status` reports a new link as a regular file. So on `main` every `symlink` call on Windows throws and `guest_kernel_sys` aborts: ``` [libc] unhandled exception 'St12system_error' what(): symlink: Function not implemented ``` The first head of this PR fixed creation only. With Developer Mode on, @screamm and @santhoshkumar-dev found the test still failed after a real link was created, because `symlink_status` and `read_symlink` don't see Windows links; @Amoenus confirmed it 5/5. This head follows screamm's suggestions. On Windows the test checks the new links through `FILE_ATTRIBUTE_REPARSE_POINT` and `EEXIST` on a second create, without `readlink`. Reading a Windows link's target back (`FSCTL_GET_REPARSE_POINT`) is left for a later change, so `readlink` throws there for now. ### Tested This head (6aa0b4fb): - Linux (Ubuntu 24.04, GCC 13), Release: `guest_kernel_sys` passes 5/5 (`--repeat until-fail:5`), including the full round trip through `readlink`. - Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release, Developer Mode off: 5/5, no warnings; `symlink` returns `EPERM` and the test skips the success cases (also run by @Silverash-i8). - Windows 11 with link creation allowed: 5/5 serial runs by @Amoenus, through the creation, `EEXIST` and dangling-link cases. - Windows 11 Pro with Developer Mode on, merged onto `main` a11c8f7f: 5/5 by @screamm, through the same cases. - On `main` 1e8fff68, `guest_kernel_sys` aborts on Windows with the error above. `check_conventions.py` passes. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
Silverash-i8 commented 2026-10-11 12:14:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T12:14:36Z.


Windows run without Developer Mode, the case screamm's machine didn't cover: Windows 11, WinLibs GCC 15.2.0 r7, Release, b2dae2ad merged onto main 2220effb (together with #3485 and #3518; #3485 also changes libkernel_sys/Export.cpp, and they merged without conflicts), full build.

guest_kernel_sys passes. On main it aborts with symlink: Function not implemented; with this PR, symlink returns -1 with errno 1 (EPERM) here, so the test takes its "symbolic links unavailable: the symlink success cases not tested" branch, and the error cases (missing directory, null target, empty path) pass. The non-GPU suite is 460/462: windows_exceptions (#3411) as on main, and guest_ampr_markers once (passed 5/5 on rerun, #3371).

AI-assisted (Claude Code); I ran all of this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108908767 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6108908767). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T12:14:36Z. --- Windows run without Developer Mode, the case screamm's machine didn't cover: Windows 11, WinLibs GCC 15.2.0 r7, Release, `b2dae2ad` merged onto `main` 2220effb (together with #3485 and #3518; #3485 also changes `libkernel_sys/Export.cpp`, and they merged without conflicts), full build. `guest_kernel_sys` passes. On `main` it aborts with `symlink: Function not implemented`; with this PR, `symlink` returns -1 with errno 1 (EPERM) here, so the test takes its "symbolic links unavailable: the symlink success cases not tested" branch, and the error cases (missing directory, null target, empty path) pass. The non-GPU suite is 460/462: `windows_exceptions` (#3411) as on `main`, and `guest_ampr_markers` once (passed 5/5 on rerun, #3371). AI-assisted (Claude Code); I ran all of this on my machine.
Silverash-i8 commented 2026-10-11 12:26:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T12:26:32Z.


Passing on a finding from @santhoshkumar-dev on #3485, since it's about this PR: with Developer Mode on, CreateSymbolicLinkW succeeds and guest_kernel_sys then stops at the success branch's Require(std::filesystem::is_symlink(std::filesystem::symlink_status(symbolic))). My run above passed only because without Developer Mode it took the EPERM branch.

I checked the cause here without creating a link, on the built-in C:\Users\All Users, which is a real symbolic link (fsutil reparsepoint query gives tag 0xa000000c, IO_REPARSE_TAG_SYMLINK). A program built with WinLibs GCC 15.2.0 r7 gets is_symlink(symlink_status(...)) == false (type reported as directory) and read_symlink fails with Function not implemented.

So it isn't only the test: readlink_nid_postfix uses the same symlink_status / read_symlink, so on Windows a link that this PR's symlink creates would read back as EINVAL from readlink, and the next assert (readlink(...) == 12) would fail too. CI wouldn't show it yet, since the Windows job is skipped while conventions fails on main, and GitHub's Windows runners can normally create symlinks, so they'd take the success branch. Options I can see: read the reparse point directly on Windows (FSCTL_GET_REPARSE_POINT) in readlink and check the round trip with that, or skip the success cases on MinGW the way the existing readlink link cases already are.

AI-assisted (Claude Code); I ran the All Users check on my machine. I haven't run the success branch itself, since I can't create symlinks here.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109005383 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109005383). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T12:26:32Z. --- Passing on a finding from @santhoshkumar-dev on #3485, since it's about this PR: with Developer Mode on, `CreateSymbolicLinkW` succeeds and `guest_kernel_sys` then stops at the success branch's `Require(std::filesystem::is_symlink(std::filesystem::symlink_status(symbolic)))`. My run above passed only because without Developer Mode it took the EPERM branch. I checked the cause here without creating a link, on the built-in `C:\Users\All Users`, which is a real symbolic link (`fsutil reparsepoint query` gives tag `0xa000000c`, `IO_REPARSE_TAG_SYMLINK`). A program built with WinLibs GCC 15.2.0 r7 gets `is_symlink(symlink_status(...)) == false` (type reported as directory) and `read_symlink` fails with `Function not implemented`. So it isn't only the test: `readlink_nid_postfix` uses the same `symlink_status` / `read_symlink`, so on Windows a link that this PR's `symlink` creates would read back as EINVAL from `readlink`, and the next assert (`readlink(...) == 12`) would fail too. CI wouldn't show it yet, since the Windows job is skipped while `conventions` fails on `main`, and GitHub's Windows runners can normally create symlinks, so they'd take the success branch. Options I can see: read the reparse point directly on Windows (`FSCTL_GET_REPARSE_POINT`) in `readlink` and check the round trip with that, or skip the success cases on MinGW the way the existing readlink link cases already are. AI-assisted (Claude Code); I ran the `All Users` check on my machine. I haven't run the success branch itself, since I can't create symlinks here.
screamm commented 2026-10-11 12:28:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T12:28:57Z.


Windows validation of the current head b2dae2ad merged onto main 1e8fff68, with Developer Mode on (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Release), which is the branch nobody had run yet:

CreateSymbolicLinkW succeeds here for both the file and the directory link, so the EPERM skip is not taken, and guest_kernel_sys then aborts at the next check: Kernel sys check failed at line 133 (guest errno 2) (exit 0xc0000409). A probe built with the same toolchain shows why: on this libstdc++ std::filesystem::symlink_status reports the new link as a regular file (is_symlink false) and std::filesystem::read_symlink fails with error 40 (Function not implemented). So on Windows readlink returns EINVAL for a real link, the existing-link check follows the link (a dangling link looks missing and the second create fails with ERROR_ALREADY_EXISTS, which this PR throws instead of returning EEXIST), and lstat still throws on reparse points (#2898).

Two suggestions for this PR so it is green with Developer Mode on: map ERROR_ALREADY_EXISTS/ERROR_FILE_EXISTS to EEXIST (and ERROR_PATH_NOT_FOUND to ENOENT), and make the test's post-creation checks on Windows use what the host supports (GetFileAttributesW reporting FILE_ATTRIBUTE_REPARSE_POINT, as NativeStat.cpp does since #2898) rather than readlink/symlink_status, until a Windows readlink reading the reparse data (FSCTL_GET_REPARSE_POINT) exists. Happy to rerun.

Validation run with Claude Code assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109025188 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109025188). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T12:28:57Z. --- Windows validation of the current head `b2dae2ad` merged onto `main` `1e8fff68`, with **Developer Mode on** (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Release), which is the branch nobody had run yet: `CreateSymbolicLinkW` succeeds here for both the file and the directory link, so the `EPERM` skip is not taken, and `guest_kernel_sys` then aborts at the next check: `Kernel sys check failed at line 133 (guest errno 2)` (exit `0xc0000409`). A probe built with the same toolchain shows why: on this libstdc++ `std::filesystem::symlink_status` reports the new link as a regular file (`is_symlink` false) and `std::filesystem::read_symlink` fails with error 40 (`Function not implemented`). So on Windows `readlink` returns `EINVAL` for a real link, the existing-link check follows the link (a dangling link looks missing and the second create fails with `ERROR_ALREADY_EXISTS`, which this PR throws instead of returning `EEXIST`), and `lstat` still throws on reparse points (#2898). Two suggestions for this PR so it is green with Developer Mode on: map `ERROR_ALREADY_EXISTS`/`ERROR_FILE_EXISTS` to `EEXIST` (and `ERROR_PATH_NOT_FOUND` to `ENOENT`), and make the test's post-creation checks on Windows use what the host supports (`GetFileAttributesW` reporting `FILE_ATTRIBUTE_REPARSE_POINT`, as `NativeStat.cpp` does since #2898) rather than `readlink`/`symlink_status`, until a Windows `readlink` reading the reparse data (`FSCTL_GET_REPARSE_POINT`) exists. Happy to rerun. Validation run with Claude Code assistance.
babyhuey commented 2026-10-11 12:32:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T12:32:33Z.


Thanks @screamm, @Silverash-i8 and @santhoshkumar-dev, that's the case I couldn't run. I have a rework on babyhuey:test/verify-symfix2 (6aa0b4fb, one commit on main 1e8fff68), following screamm's suggestions:

  • symlink checks for an existing name with GetFileAttributesW on Windows, which sees a dangling link too, and maps ERROR_ALREADY_EXISTS/ERROR_FILE_EXISTS to EEXIST and ERROR_PATH_NOT_FOUND to ENOENT.
  • readlink on a path with FILE_ATTRIBUTE_REPARSE_POINT throws on Windows, as lstat does since #2898, instead of returning EINVAL for a real link.
  • On Windows the test checks FILE_ATTRIBUTE_REPARSE_POINT on the new links and EEXIST on a second create, without readlink or symlink_status.

guest_kernel_sys passes 5/5 on Linux. I'll move it onto this PR once it also passes on Windows. @screamm, if you're still up for a Developer Mode run, that branch is the one to try.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109055159 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109055159). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-11T12:32:33Z. --- Thanks @screamm, @Silverash-i8 and @santhoshkumar-dev, that's the case I couldn't run. I have a rework on [`babyhuey:test/verify-symfix2`](https://github.com/babyhuey/AnyPS5/tree/test/verify-symfix2) (6aa0b4fb, one commit on `main` 1e8fff68), following screamm's suggestions: - `symlink` checks for an existing name with `GetFileAttributesW` on Windows, which sees a dangling link too, and maps `ERROR_ALREADY_EXISTS`/`ERROR_FILE_EXISTS` to `EEXIST` and `ERROR_PATH_NOT_FOUND` to `ENOENT`. - `readlink` on a path with `FILE_ATTRIBUTE_REPARSE_POINT` throws on Windows, as `lstat` does since #2898, instead of returning `EINVAL` for a real link. - On Windows the test checks `FILE_ATTRIBUTE_REPARSE_POINT` on the new links and `EEXIST` on a second create, without `readlink` or `symlink_status`. `guest_kernel_sys` passes 5/5 on Linux. I'll move it onto this PR once it also passes on Windows. @screamm, if you're still up for a Developer Mode run, that branch is the one to try.
Silverash-i8 commented 2026-10-11 12:35:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T12:35:29Z.


@babyhuey the other half for test/verify-symfix2 (6aa0b4fb, as is on 1e8fff68), without Developer Mode: Windows 11, WinLibs GCC 15.2.0 r7, Release. guest_kernel_sys passes 5/5 (--repeat until-fail:5). symlink still gives EPERM here, so it takes the "symbolic links unavailable" branch, and the error cases after it (missing directory, null target, empty name) pass with the new GetFileAttributesW check in front. The Developer Mode branch still needs screamm's run; I can't create symlinks on this machine.

AI-assisted (Claude Code); I ran this on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109079353 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109079353). Originally posted by [Silverash-i8](https://github.com/Silverash-i8) on 2026-10-11T12:35:29Z. --- @babyhuey the other half for `test/verify-symfix2` (6aa0b4fb, as is on `1e8fff68`), without Developer Mode: Windows 11, WinLibs GCC 15.2.0 r7, Release. `guest_kernel_sys` passes 5/5 (`--repeat until-fail:5`). `symlink` still gives EPERM here, so it takes the "symbolic links unavailable" branch, and the error cases after it (missing directory, null target, empty name) pass with the new `GetFileAttributesW` check in front. The Developer Mode branch still needs screamm's run; I can't create symlinks on this machine. AI-assisted (Claude Code); I ran this on my machine.
Amoenus commented 2026-10-11 12:39:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-11T12:39:49Z.


Independent Windows validation (2026-10-11, Amoenus)

Confirmed the positive Windows creation path independently on Windows 11 Enterprise build 26200, WinLibs GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON:

  • Main 2220effbe plus our existing integration prerequisites: guest_kernel_sys aborts at symlink: Function not implemented.
  • PR head b2dae2adf102a26b62f0e99ef695e3612cb2a1ba: creation succeeds, then the fixture aborts at Require(is_symlink(symlink_status(symbolic))) (our integration line 144). 5/5 serial invocations fail there, exit 0xc0000409. This confirms the success-path problem already reported above; it is not a readlink assertion failure yet.
  • Your rework branch test/verify-symfix2, commit 6aa0b4fb22d1745755c6bba983503a8801a27f3f, carried into the same integration: guest_kernel_sys passes 5/5 serial verbose runs, in addition to 5/5 in our parallel relevant-suite run. The new symlink EPERM/success-skip message never appears. The Windows creation block therefore exercises a relative regular-file link, duplicate EEXIST, dangling link, and duplicate dangling-link EEXIST, plus the existing null/empty/missing-parent checks.

A separate host-only probe, rebuilt with the same toolchain, confirms the limitation on newly created links in 5/5 runs:

std_create_symlink: generic 40, Function not implemented
CreateSymbolicLinkW: success=1, error=0
std_symlink_status: type=1 (regular), is_symlink=0, error=0
std_read_symlink: generic 40, Function not implemented
GetFileAttributesW: attributes=1056, reparse=1

This validates the rework's creation/error paths. It does not validate Windows target readback: the rework explicitly throws for readlink of a reparse point. The older fixture's host-std-created link block still prints symbolic links unavailable: the link cases not tested; that is separate from the new successful guest-symlink block. No directory-link positive case or PS5 hardware behavior was measured. I have not queried Developer Mode/elevation; native creation is simply allowed on this machine.

Full build and all 122 patched system libraries succeed; all 19 selected relevant groups pass five times each (95 passes), including both filesystem groups, guest math/CRT/locale, pthread groups and AGC groups. check_conventions.py --base 2220effbe passes. This is a combined integration, not an unchanged-main or full-suite claim. The rework's exact authored 47-insertion/8-deletion delta is retained; the only cherry-pick conflict was the include block, resolved by preserving our existing string_view include and adding its Windows include, without importing its parent's unrelated Linux fchdir changes.

Reproducible integration source (authors retained; fork only, no PR created). AI-assisted execution and report: Codex. Controlled PPSA99902 comparison completed: two runs before (29.774s, 28.48s) and two after (28.886s, 28.611s) reach the same unsupported multisampled descriptor-shape guard, exit0xc0000409/no timeout. The122-library profiles differ only in libkernel_sys (121 byte-identical); fixed guarded f609 title conversion/guest libc in both. No observed startup advance from this change. Full title-validation details.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109114634 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109114634). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-11T12:39:49Z. --- ### Independent Windows validation (2026-10-11, Amoenus) Confirmed the positive Windows creation path independently on Windows 11 Enterprise build 26200, WinLibs GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON: - Main `2220effbe` plus our existing integration prerequisites: `guest_kernel_sys` aborts at `symlink: Function not implemented`. - PR head `b2dae2adf102a26b62f0e99ef695e3612cb2a1ba`: creation succeeds, then the fixture aborts at `Require(is_symlink(symlink_status(symbolic)))` (our integration line 144). **5/5 serial invocations fail there**, exit `0xc0000409`. This confirms the success-path problem already reported above; it is not a `readlink` assertion failure yet. - Your rework branch `test/verify-symfix2`, commit `6aa0b4fb22d1745755c6bba983503a8801a27f3f`, carried into the same integration: **guest_kernel_sys passes 5/5 serial verbose runs**, in addition to 5/5 in our parallel relevant-suite run. The new symlink EPERM/success-skip message never appears. The Windows creation block therefore exercises a relative regular-file link, duplicate EEXIST, dangling link, and duplicate dangling-link EEXIST, plus the existing null/empty/missing-parent checks. A separate host-only probe, rebuilt with the same toolchain, confirms the limitation on newly created links in **5/5 runs**: ``` std_create_symlink: generic 40, Function not implemented CreateSymbolicLinkW: success=1, error=0 std_symlink_status: type=1 (regular), is_symlink=0, error=0 std_read_symlink: generic 40, Function not implemented GetFileAttributesW: attributes=1056, reparse=1 ``` This validates the rework's creation/error paths. It does **not** validate Windows target readback: the rework explicitly throws for readlink of a reparse point. The older fixture's host-std-created link block still prints `symbolic links unavailable: the link cases not tested`; that is separate from the new successful guest-symlink block. No directory-link positive case or PS5 hardware behavior was measured. I have not queried Developer Mode/elevation; native creation is simply allowed on this machine. Full build and all 122 patched system libraries succeed; all **19 selected relevant groups pass five times each (95 passes)**, including both filesystem groups, guest math/CRT/locale, pthread groups and AGC groups. `check_conventions.py --base 2220effbe` passes. This is a combined integration, not an unchanged-main or full-suite claim. The rework's exact authored 47-insertion/8-deletion delta is retained; the only cherry-pick conflict was the include block, resolved by preserving our existing string_view include and adding its Windows include, without importing its parent's unrelated Linux fchdir changes. [Reproducible integration source](https://github.com/Amoenus/AnyPS5/commit/e5a62c5941d534299bd870852700d2846227dad4) (authors retained; fork only, no PR created). AI-assisted execution and report: Codex. Controlled PPSA99902 comparison completed: two runs before (29.774s, 28.48s) and two after (28.886s, 28.611s) reach the same unsupported multisampled descriptor-shape guard, exit0xc0000409/no timeout. The122-library profiles differ only in libkernel_sys (121 byte-identical); fixed guarded f609 title conversion/guest libc in both. No observed startup advance from this change. [Full title-validation details](https://github.com/boykopovar/AnyPS5/issues/3036).
github-actions[bot] commented 2026-10-11 12:43:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T12:43:17Z.


Progress report (a11c8f7 → 6aa0b4f)

📉 System libraries: 85.78% (-0.03%, -1 reverted functions)

⚠️ 1 went back to stubs
Library Name
libkernel_sys readlink_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109142952 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109142952). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T12:43:17Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 6aa0b4f) 📉 **System libraries**: 85.78% (-0.03%, -1 reverted functions) <details> <summary>⚠️ 1 went back to stubs</summary> | Library | Name | | - | - | | libkernel_sys | `readlink_nid_postfix` | </details>
babyhuey commented 2026-10-11 12:43:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T12:43:17Z.


Moved test/verify-symfix2 (6aa0b4fb) onto this PR, since it now has a Windows run with link creation allowed (thanks @Amoenus) as well as without it (thanks @Silverash-i8). I updated the description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109142991 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109142991). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-11T12:43:17Z. --- Moved `test/verify-symfix2` (6aa0b4fb) onto this PR, since it now has a Windows run with link creation allowed (thanks @Amoenus) as well as without it (thanks @Silverash-i8). I updated the description.
github-actions[bot] commented 2026-10-11 13:27:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T13:27:28Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3485 core/libs/prx/libkernel_sys/Export.cpp L17-18, L72, L124-125
#3555 core/libs/prx/libkernel_sys/Export.cpp L18
#3611 core/libs/prx/libkernel_sys/Export.cpp L30-32
#3685 core/libs/prx/libkernel_sys/Export.cpp L29-32
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109516848 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6109516848). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T13:27:28Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3485 | `core/libs/prx/libkernel_sys/Export.cpp` [L17-18](https://github.com/boykopovar/AnyPS5/blob/4be9c255192bca142dfa349b81caf71b08ebb607/core/libs/prx/libkernel_sys/Export.cpp#L17-L18), [L72](https://github.com/boykopovar/AnyPS5/blob/4be9c255192bca142dfa349b81caf71b08ebb607/core/libs/prx/libkernel_sys/Export.cpp#L72), [L124-125](https://github.com/boykopovar/AnyPS5/blob/4be9c255192bca142dfa349b81caf71b08ebb607/core/libs/prx/libkernel_sys/Export.cpp#L124-L125) | | | | #3555 | `core/libs/prx/libkernel_sys/Export.cpp` [L18](https://github.com/boykopovar/AnyPS5/blob/4be9c255192bca142dfa349b81caf71b08ebb607/core/libs/prx/libkernel_sys/Export.cpp#L18) | | | | #3611 | `core/libs/prx/libkernel_sys/Export.cpp` [L30-32](https://github.com/boykopovar/AnyPS5/blob/4be9c255192bca142dfa349b81caf71b08ebb607/core/libs/prx/libkernel_sys/Export.cpp#L30-L32) | | | | #3685 | `core/libs/prx/libkernel_sys/Export.cpp` [L29-32](https://github.com/boykopovar/AnyPS5/blob/4be9c255192bca142dfa349b81caf71b08ebb607/core/libs/prx/libkernel_sys/Export.cpp#L29-L32) | | |
screamm commented 2026-10-11 14:57:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T14:57:51Z.


Developer Mode run of 6aa0b4fb (the branch @babyhuey asked for), merged onto main a11c8f7f (clean merge): Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including libs. AllowDevelopmentWithoutDevLicense is 1 on this machine, so CreateSymbolicLinkW succeeds here.

  • guest_kernel_sys: passes 5/5 (--repeat until-fail:5). The "symlink success cases not tested" line does not appear, so the Windows creation block ran: regular-file link with FILE_ATTRIBUTE_REPARSE_POINT, EEXIST on the second create, dangling link, EEXIST on the second dangling create, then the missing-parent, null-target and empty-name errors. The only skip line is the pre-existing "symbolic links unavailable: the link cases not tested" from the readlink block, where the test itself uses std::filesystem::create_symlink and MinGW's libstdc++ returns ENOSYS.
  • On main a11c8f7f the same test aborts here with symlink: Function not implemented.
  • check_conventions.py --base origin/main is clean.

Unrelated: guest_filesystem fails on this machine at GuestFilesystem.cpp:286 (restoring the working directory's write time, errno 13 / Win32 error 5), on main as well as with this PR. That is what #3518 addresses.

AI-assisted (Claude Code); run on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110318030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3510#issuecomment-6110318030). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T14:57:51Z. --- Developer Mode run of `6aa0b4fb` (the branch @babyhuey asked for), merged onto `main` `a11c8f7f` (clean merge): Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`, full build including `libs`. `AllowDevelopmentWithoutDevLicense` is 1 on this machine, so `CreateSymbolicLinkW` succeeds here. - `guest_kernel_sys`: passes 5/5 (`--repeat until-fail:5`). The "symlink success cases not tested" line does not appear, so the Windows creation block ran: regular-file link with `FILE_ATTRIBUTE_REPARSE_POINT`, `EEXIST` on the second create, dangling link, `EEXIST` on the second dangling create, then the missing-parent, null-target and empty-name errors. The only skip line is the pre-existing "symbolic links unavailable: the link cases not tested" from the `readlink` block, where the test itself uses `std::filesystem::create_symlink` and MinGW's libstdc++ returns `ENOSYS`. - On `main` `a11c8f7f` the same test aborts here with `symlink: Function not implemented`. - `check_conventions.py --base origin/main` is clean. Unrelated: `guest_filesystem` fails on this machine at `GuestFilesystem.cpp:286` (restoring the working directory's write time, errno 13 / Win32 error 5), on `main` as well as with this PR. That is what #3518 addresses. AI-assisted (Claude Code); run on my machine.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3510
No description provided.