You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(relinker): accept trailing separators on the Windows origin path - #4337
relinker --windows --rpath '$ORIGIN/' ... rejects a valid executable-directory library path with Ambiguous Windows run path, while $ORIGIN succeeds. Normalization strips the prefix to an empty string and reads back() 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.
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.
Identical test_windows_runpath.py fails on baseline at $ORIGIN/, after the bare $ORIGIN control successfully converts and executes. The fixed test passes with $ORIGIN, $ORIGIN/, $ORIGIN\, $ORIGIN/. and .; all five generated consumers load the provider and exit 77.
Baseline binary built at b42ef24e07725ba1166420073817d80a60ec9149; current base d06c06565717961104edecdab46ce61c8cc72a70 has identical relinker, build and tooling sources. The fixed build uses the current base.
Relinker-only Release build with BUILD_TESTING=ON and explicit Python3_EXECUTABLE succeeds; Python-backed input_magic is 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 --check passes. python tools/check_conventions.py --base origin/main passes 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 normalizeRunPath or 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
Based on current main; no other open PR implements the same functions
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.
@codingreapermaps, I checked this PR against #4547 using Git's merge engine, normalizing both heads onto main d592d54e11ecce022abd62635a58bf2d048f3a2c and using that main as the explicit merge base.
At heads e2c24cf038b9bb5f200a666b2b5fedf2fdf10ff9 (#4337) and 0af8b55e8a2d3a37795234cf729ea50589c1aaa7 (#4547), both merge cleanly with main. Combining them conflicts only in core/relinker/CMakeLists.txt: windows_runpath and windows_trace_imports are inserted at the same location. The WindowsEntryStubBuilder.cpp changes 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: #4337 for 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)