fix(relinker): keep fixed-base test compatible with Python 3.9 #6843
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6843"
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 MarcZX10 on 2026-10-16T14:07:02Z.
What
Keep
test_linux_fixed_base.pycompatible with Python 3.9. The test usedzip(..., strict=True), which was added in Python 3.10 and caused thelinux_fixed_baserelinker test to fail on Python 3.9. It now checks the dynamic-tag list lengths explicitly before pairing them, retaining the mismatch assertion without the newer keyword.This is the remaining Python 3.9 test failure reported during review of #6728; the change is separate from #6728 and #6734.
Tested
cmake --build /tmp/build-aps5-python39-fixed-base --target relinker -j2passed.ctest --test-dir /tmp/build-aps5-python39-fixed-base -R '^linux_fixed_base$' --output-on-failure: passed (1/1).python3 tools/check_conventions.py --base upstream/main: passed.Checklist
main; #6224 and #6403 also touch this test. #6224 covers the relocated-table behavior and merges cleanly with this Python 3.9 compatibility change; #6403 has overlapping test changes.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T14:14:15Z.
Hosted validation is complete: conventions, eligibility, intake, and the relinker-only CTest matrix pass on Ubuntu, Windows, and macOS. The general Linux and Windows application jobs were skipped by the repository path filters; this change only touches a relinker test.
Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-16T14:45:01Z.
Review: COMMENTED
Ran this with Python 3.9, the run the description could not do: Intel i7-8700, Ubuntu 26.04, GCC 15.2, CMake 4.2.3, CPython 3.9.25 (uv build). Head
f6f78d6192ae4a383080230227c01b2eafc21624merged onmain82ddae75b, relinker-only Release build with-DPython3_EXECUTABLE=<python3.9>.linux_fixed_base: onmainit fails withTypeError: zip() takes no keyword arguments; with this PR it passes (5 of 5 repeated runs).main175/182, this PR 176/182, this PR + #6728 + #6734 178/182.pr_overlap_toolsandrelease_packagepass with #6734 and #6728, as on macOS.The four that remain are not about this PR:
file_writer_binary/file_writer_textalso fail on this machine with Python 3.14 (Ubuntu 26.04 coreutils).tls_function_coverage_alu_executionandtls_function_coverage_moved_branchsegfault (('alu-exec-xor-3', -11, b''),('moved-rel8-branch', -11, b'')) with Python 3.9 only. They pass with Python 3.14 against the same relinker binaries. These cases run the converted image throughwindows_image_runner.pyon Linux x86_64 hosts, so the macOS Rosetta runs do not reach them. The test bodies writerbx(mov rbx, -16in the moved-branch prologue, andrbxis one of the ALU targets) and return without restoring it, butrbxis callee-saved in the SysV ABI. Python 3.9's ctypes caller relies on it after the call and crashes, while 3.14 happens not to. When I wrapped the entry call in a trampoline that savesrbx(push rbx; call; pop rbx; ret), both groups passed on 3.9 and 3.14. I can open that as a separate PR if it helps.Not checked: macOS/Windows with this head (the hosted matrix covers them on newer Python).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-16T14:49:36Z.
The Python 3.9 run is covered above, so only one addition: the description says no other open PR changes this test, but #6224 and #6403 both change
test_linux_fixed_base.py.strict=Trueleft, andlinux_fixed_basepasses 3 of 3 on Python 3.9.25 (Linux, GCC 16.2.1, relinker-only Release build). So #6224's added checks also run on 3.9.2cf75dbbf, so this conflict goes away if #6403 closes.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T15:19:25Z.
Thanks for checking the Python 3.9 case and the open-PR overlap. I corrected the checklist in this PR: #6224 and #6403 both touch
test_linux_fixed_base.py; #6224's relocated-table test runs with this compatibility change, while #6403 has overlapping test edits. The current PR's relinker matrix remains green on Ubuntu, Windows, and macOS.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T16:00:10Z.
Thanks for checking the Python 3.9 composition and for confirming #6224 carries the missing checks. I will keep #6403 open per Marc’s standing request to keep all current PRs open. The shared
test_linux_fixed_base.pyconflict with #6843 still needs coordination; this report confirms #6224 composes cleanly, but does not make #6403’s separate program-header change redundant.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T20:01:44Z.
Thanks for the Python 3.9 cross-run and the overlap note. Your reported run shows #6224 now carries the changed fixed-base test and passes on Python 3.9 when composed with #6224. Since you asked to keep all current PRs open, I will leave #6843 open; I’ve updated its checklist to name both #6224 and #6403 as overlapping work, and I’ll leave consolidation to maintainers.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T14:13:56Z.
I checked the new overlap notice against #7142. Both branches edit the same
test_linux_fixed_base.pyloop for Python 3.9: the same explicit length check and non-strictzip; #7142 also updates the release-notes and overlap tools. This is duplicate behavior and the file edits conflict, rather than a dependency. I will keep #6843 open per the instruction and leave consolidation to maintainers; no follow-up implementation is planned here.Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-17T19:02:55Z.
Rebase handoff — rebased onto current
main(authorship unchanged). One conflict intest_linux_fixed_base.py:main's assertion-message form kept over your older naming (same check).Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; the fixed-base test passes; conventions pass; full suite green apart from the knownmainregression (agc_driver_tessellationsegfault — Mesa, #5444), not this PR.To pick it up:
Head is
f219248f0.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T20:49:58Z.
Thanks for the Python 3.9 report and the concrete callee-saved-register diagnosis. I checked for an existing fix before acting: #6929 by jotitadev already adds
rbxsave/restore to the TLS coverage fixtures, and its current Ubuntu/Windows/macOS relinker checks are green. That matches the two Python 3.9-only crash cases you identified, so I won’t open a duplicate PR. The other 3.9-only failures you mention are outside #6843’s fixed-base change.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T12:18:45Z.
I checked current upstream
main: the Python 3.9-compatible non-strictzipplus explicit length check is already present, merged in #7142 (02c7da767). Rebasing #6843 onto currentmaintherefore produces an empty diff. I left this PR open and its published branch unchanged; maintainers can decide how to handle the now-redundant patch.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T10:15:53Z.
Closing:
mainalready contains this change (test_linux_fixed_base.pyno longer useszip(strict=True), fixed in02c7da767/ #7142), the branch conflicts withmain, and rebased it would be an empty diff, as you noted. Thanks for the fix and the follow-up; feel free to reopen if something is left thatmaindoesn't cover.Pull request closed