fix(relinker): compare guest module directories by identity #6276

Closed
MarcZX10 wants to merge 1 commit from upstream-pr/6276 into main
MarcZX10 commented 2026-10-15 08:54:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T08:54:02Z.


What

Fixes #6136. Compare guest module directories by filesystem identity so case aliases and symlinks cannot bypass duplicate-directory and executable-in-module-directory checks. The error_code overload keeps comparison safe for absent built-in module paths.

Tested

Linux x86_64, GCC 12.2:

  • Compiled the changed C++ translation units and linked the relinker against the available Linux relinker core archive.
  • test_executables.py: passed.
  • test_guest_module_dir.py: passed.
  • python3 tools/check_conventions.py --base upstream/main --head HEAD: passed.
  • git diff --check: passed.

Hosted relinker CTest passed on Ubuntu (GCC), macOS (Clang), and Windows (GCC). The regression tests exercise case-only aliases when the runner filesystem resolves the alternate spelling to the same directory, and symlink aliases where directory symlinks are available. Application build jobs were skipped by path filters; no title run was needed for this relinker change.

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; this change adds no unimplemented paths
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source; none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: #6136
  • GPUs tested: n/a (relinker change)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4870708828 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6276). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-15T08:54:02Z. --- ### What Fixes #6136. Compare guest module directories by filesystem identity so case aliases and symlinks cannot bypass duplicate-directory and executable-in-module-directory checks. The `error_code` overload keeps comparison safe for absent built-in module paths. ### Tested Linux x86_64, GCC 12.2: - Compiled the changed C++ translation units and linked the relinker against the available Linux relinker core archive. - `test_executables.py`: passed. - `test_guest_module_dir.py`: passed. - `python3 tools/check_conventions.py --base upstream/main --head HEAD`: passed. - `git diff --check`: passed. Hosted relinker CTest passed on Ubuntu (GCC), macOS (Clang), and Windows (GCC). The regression tests exercise case-only aliases when the runner filesystem resolves the alternate spelling to the same directory, and symlink aliases where directory symlinks are available. Application build jobs were skipped by path filters; no title run was needed for this relinker change. ### 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 - [x] Unimplemented paths throw; this change adds no unimplemented paths - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source; none added - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: #6136 - [x] GPUs tested: n/a (relinker change) - [x] AI-assisted: yes
MarcZX10 commented 2026-10-15 09:05:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T09:05:04Z.


Closing this newer PR as a duplicate of #6156. I missed the existing local worktree/PR during candidate verification. #6156 carries Jota’s original commit and has independent Windows/macOS validation for the alias cases, so it is the better single PR to keep under review.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6188488924 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6276#issuecomment-6188488924). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-15T09:05:04Z. --- Closing this newer PR as a duplicate of #6156. I missed the existing local worktree/PR during candidate verification. #6156 carries Jota’s original commit and has independent Windows/macOS validation for the alias cases, so it is the better single PR to keep under review.

Pull request closed

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!6276
No description provided.