fix(relinker): accept trailing separators on the Windows origin path #4337
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4337"
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 ArjenS-LA on 2026-10-12T07:00:56Z.
What
relinker --windows --rpath '$ORIGIN/' ...rejects a valid executable-directory library path withAmbiguous Windows run path, while$ORIGINsucceeds. Normalization strips the prefix to an empty string and readsback()before constructing a rooted path.Normalize the emptied prefix to
.. Both slash and backslash forms now resolve beside the executable. The regression generates a provider, converts a consumer with five equivalent runpaths, and on Windows executes each consumer from another working directory. Each must load the adjacent provider and return its value, 77.Base:
d06c06565717961104edecdab46ce61c8cc72a70.Branch:
fix/windows-origin-slash.Fixed commit:
e2c24cf038b9bb5f200a666b2b5fedf2fdf10ff9.Tested
Windows x86-64, OS build 10.0.26200, supported WinLibs MinGW-w64 GCC 15.2.0 (
x86_64-ucrt-posix-seh, r7), Python 3.13.7.test_windows_runpath.pyfails on baseline at$ORIGIN/, after the bare$ORIGINcontrol successfully converts and executes. The fixed test passes with$ORIGIN,$ORIGIN/,$ORIGIN\,$ORIGIN/.and.; all five generated consumers load the provider and exit 77.b42ef24e07725ba1166420073817d80a60ec9149; current based06c06565717961104edecdab46ce61c8cc72a70has identical relinker, build and tooling sources. The fixed build uses the current base.BUILD_TESTING=ONand explicitPython3_EXECUTABLEsucceeds; Python-backedinput_magicis registered.ctest --test-dir build-relinker-origin-slash --output-on-failure -E 'conventions_function_bodies|conventions_wrapped_declarations|import_audit|pr_overlap_encoding' -j 4: 119/119 pass in 18.02 seconds. The four excluded tooling tests create disposable Git commits and were not repeated under the personal commit quota; baseline Python tooling tests already passed 178 tests with two Windows symlink skips.git diff --checkpasses.python tools/check_conventions.py --base origin/mainpasses on the submitted commit.This includes execution of generated Windows fixture executables and their provider. No game/title, GPU, Linux/macOS runtime or upstream CI validation is claimed.
Reviewed the complete open-PR file inventory and the diffs/discussions of #3579, #3965, #3970 and #4062, which also edit Windows startup construction. None changes
normalizeRunPathor addresses this failure. No dependency on those changes.After fast-forwarding to current main, the targeted regression passed again. Relinker builds reported no work because their sources and build configuration were unchanged. No upstream CI result is claimed.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt — no runtime exports changed.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T15:36:18Z.
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/CMakeLists.txtL404Imported from boykopovar/AnyPS5. Originally posted by ArjenS-LA on 2026-10-12T15:39:28Z.
@codingreapermaps, I checked this PR against #4547 using Git's merge engine, normalizing both heads onto main
d592d54e11ecce022abd62635a58bf2d048f3a2cand using that main as the explicit merge base.At heads
e2c24cf038b9bb5f200a666b2b5fedf2fdf10ff9(#4337) and0af8b55e8a2d3a37795234cf729ea50589c1aaa7(#4547), both merge cleanly with main. Combining them conflicts only incore/relinker/CMakeLists.txt:windows_runpathandwindows_trace_importsare inserted at the same location. TheWindowsEntryStubBuilder.cppchanges merge cleanly; these fixes have no functional dependency.Would #4337 merging first work for you, with both test registrations retained when #4547 is updated afterward? That would let #4547 record
Depends on: #4337for merge coordination alongside its existing #4546 dependency.This is a tree-only merge preview and source inspection on Windows x64. I have not built or run the combined tree, and no code changes were pushed.