relinker: guest module directory checks compare path spelling, so a different case or a symbolic link bypasses them #6136
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?
Imported from boykopovar/AnyPS5. Originally posted by zaryabzip on 2026-10-14T23:05:35Z.
Two relinker checks compare guest module directories as path strings:
--executable is in a guest module directory(core/relinker/main.cpp:213)Duplicate guest module directory(core/relinker/cli/src/NativeModules.cpp:35)A directory reached under another spelling passes both checks. That happens with a different case on a case-insensitive volume (the default on APFS and NTFS), or with a symbolic link to the directory on any volume. Conversion still fails, but later and with an unrelated error.
Reproduced with a relinker-only build of
maineea428ca8(core/relinkeris unchanged on6239ceffc), on macOS 27.0.1 arm64 with APFS (case-insensitive). Linux and Windows output give the same results.picker/plugin.prxis a guest module, andpicker.binis a second main executable:--module-dir picker --executable picker/picker.bin--executable is in a guest module directory: picker/picker.bin--module-dir Picker --executable picker/picker.bin.../Picker/picker.bin: Invalid string or symbol table--executable sce_module/picker.bin--executable is in a guest module directory: sce_module/picker.bin--executable SCE_MODULE/picker.bin.../sce_module/picker.bin: Invalid string or symbol table--module-dir picker --module-dir pickerDuplicate guest module directory: .../picker--module-dir picker --module-dir PickerConflicting guest output filename: plugin.prx.guest.prxOn a case-sensitive Ubuntu 24.04 container, a symbolic link
linkedtopickergives the same result as thePickerrows.The module scan already compares the input executable with
std::filesystem::equivalent. Comparing these directories the same way makes both checks hold. I have a fix with a regression test on a local branch (+30/−2), and I'll open it as a pull request if it is wanted while the queue is long. Not tested on a Windows host.Found by @jotitadev in https://github.com/boykopovar/AnyPS5/pull/5512#issuecomment-6173073429.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-14T23:26:05Z.
Thanks for writing this up. I have a fix for both checks on
jotitadev:fix/relinker-guest-module-path-identity(6e3b80d65, +39/−2, it merges cleanly on currentmain). It compares the directories withstd::filesystem::equivalent, with regression tests for the case alias and the symbolic link intest_guest_module_dir.pyandtest_executables.py. I can't open it yet: with no merged PR, I'm limited to one open PR, and that slot is taken.If yours is ready first, go ahead and open it. I'll run it on APFS (arm64 and x86-64 under Rosetta) and close my branch.
Written with AI assistance (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by zaryabzip on 2026-10-14T23:30:43Z.
Thanks! You found it and your fix already covers both test files, so please open yours once your slot frees up. I'll drop my branch. Happy to run it on macOS when it's up.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T08:54:18Z.
I opened #6276 with the directory identity checks and Linux symlink regression coverage. Thanks for the report and for offering to validate the fix. @jotitadev @zaryabzip, if either of you can run the case-alias scenario on APFS or Windows, that would cover the platform behavior this Linux environment cannot exercise.