fix(relinker): protect registry output from inputs #2100
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2100"
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 AaravMehta-07 on 2026-10-09T08:36:40Z.
What
Reject
--registryoutput paths that refer to either the main executable input or a bundled guest-module input. The relinker now checks the registry path against the exact module input inventory already discovered byGuestModuleBuilder, including filesystem aliases, before writing registry or converted outputs. A missing registry destination remains valid. This prevents a successful conversion from replacing an input ELF with JSON.Tested
f37e7fa3), Windows 11 / WinLibs GCC 15.2 relinker-only build and full relinker CTest suite passed (36/36).tls_function_coveragetook 68.36 seconds locally.f37e7fa3), Ubuntu WSL / GCC 15.2 relinker build and full relinker CTest suite passed (39/39).import_audittook 160.91 seconds on the mounted Windows worktree.d60ed99aond9484c71), Windows relinker-only build passed (151/151 build steps) and focusedcall_registryCTest passed (1/1, 27.74 seconds).d60ed99aond9484c71), Ubuntu WSL relinker build passed (6/6 build steps) and focusedcall_registryCTest passed (1/1, 4.68 seconds).d60ed99acompleted: conventions and eligibility passed; automatic relinker and full-project Linux/Windows jobs were skipped by #2113's contributor eligibility gate. Full-project builds require manual dispatch.app0output was created.python tools/check_conventions.py --base upstream/mainpassed.mainatd9484c719b2a5ac6201e27f8657e0fb0f01e648c, which includes #2099's SPIRV-Headers include fix and #2113's CI workflow change. At the previous head, hosted relinker jobs passed on Windows, Linux, and macOS and conventions passed. The previous full-project Windows/Linux builds failed in unchangedagc_shader_fusion_testsbecause its include list omitted3rdparty/SPIRV-Headers/include; base and PR blob hashes for the relevant AGC files matched, and a local WinLibs GCC 15.2 compile reproduced the failure and passed with that include root added. The upstream include fix has since merged; no AGC code is part of this PR. Under #2113, full-project builds are manual rather than automatic for contributor PRs.Checklist
main; no other open PR implements this input-overwrite protection. PR #1462 adds per-module registry output. PR #1815 changes nested guest-module discovery earlier inGuestModuleBuilder::Build; this preflight follows the completed input inventory and checks its paths, including any newly discovered modules. The behavior is complementary and has no dependency on #1815.NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T09:05:26Z.
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.
main)core/relinker/main.cppL94core/relinker/relinker/include/relinker/guest/GuestImage.hppL57core/relinker/relinker/src/guest/GuestModuleBuilder.cppL34core/relinker/main.cppL94core/relinker/relinker/include/relinker/guest/GuestImage.hppL57core/relinker/relinker/src/guest/GuestModuleBuilder.cppL34, L89Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:08:46Z.
Closing: this guards against pointing
--registryat one of the conversion's own inputs, which nobody has reported running into, and it touches the same lines as several open relinker PRs. Please reopen if it comes up in practice.Pull request closed