Repository navigation
fix(relinker): honor PS4 needed-module tags - #20574
Conversation
|
Tested
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
inFAMOUS Second Son (PS4) with and without this head: its executable declares 28 PS4 needed-module tags (
AI-assisted: yes. Claude Code ran the builds, the conversions and the runs, and drafted this comment; a separate review agent checked it. The numbers are from the runs on this machine. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed PS4 needed-module tags — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
- Head
40383cd7e59d61220783f03d9fc5b78f2d813359, basemain. - Read the diff of both changed files, then the head context around the change with
repo_read.py. - Compared the new tag handling with the guest reader.
- No build, no CTest run, and no hosted CI check in this pass.
python3 repo_read.py cat core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp 296 336
python3 repo_read.py cat core/relinker/relinker/src/guest/GuestImageReader.cpp 75 115
python3 repo_read.py search ps4ModuleImports
python3 repo_read.py search 0x6100000fResults
| Check | Result | Note |
|---|---|---|
| Diff of both changed files | passed | Read in full as diff |
| Parity with guest reader | passed | Same mixed-tag and duplicate-ID rules |
| Relinker build and focused CTests | not run | Author-reported, Windows only |
| Hosted CI for this head | not run | Not fetched in this pass |
| Overlap scan | not run | Author-reported, five comparisons incomplete |
Commands and output
Search for 0x6100000f at the head returned the relinker pipeline, the guest reader, and the new tests. Search for ps4ModuleImports returned the two readers and the mixed-tag check at core/relinker/relinker/src/guest/GuestImageReader.cpp:194.
Findings
Blocking
- None.
Non-blocking
core/relinker/relinker/tests/test_windows_import_modules.py:715: the runtime assertions (exit code 22, unresolved-import stderr) run only whenos.name == 'nt'. On Linux only the structural checks run. This follows the existing test style, so it is a note, not a defect.
Sources
- Mixed-tag and duplicate-ID handling:
AnyPS5/core/relinker/relinker/src/pipeline/RelinkerPipeline.cpp
Lines 320 to 333 in 40383cd
- Matching guest reader rule:
AnyPS5/core/relinker/relinker/src/guest/GuestImageReader.cpp
Lines 194 to 195 in 40383cd
Not verified
- The Windows CTests (nine named tests) and the module-scoped import test, which the author reports as passed. I did not run them.
- Native Linux execution of the Windows-test fixtures (author reports it was not run).
- Hosted CI status for this head. The approval rules need it to pass before approval, so this review is COMMENT.
- Author identity for the approval rules; the description does not state it.
- Unchanged parts of
test_windows_import_modules.py. Only its changed hunks were read. - The five overlap comparisons the author could not complete (#10861, #11525, #15896, #15903, #17105).
To get this to a good state
Nothing is required.
What
Honor PS4 needed-module declarations (
0x6100000f) when mapping the main executable's qualified imports. Previously those declarations were ignored, allowing a shared symbol to bind to the first provider rather than its declared module. Match the existing guest reader's PS4/PS5 tag handling, including duplicate-ID checks and rejection of mixed-generation declarations.Tested
Windows / WinLibs GCC 15.2 / Python 3.12: relinker-only build and nine focused CTests passed:
windows_import_modules,import_module,reloc_table_bounds,guest_symbol_names,linux_guest_qualified_imports,guest_symbolic_modules,guest_unused_import_dependencies,windows_named_imports, andlinux_named_imports. The full module-scoped import test completed in 17.14 seconds under its 30-second timeout.The original executable returned 11 from the wrong provider in the PS4 control; the change returns 22 from the declared provider. Coverage includes PS4/PS5 parity, native Windows execution, Linux output symbol bindings, module IDs/version bits, aliases, disjoint providers, duplicate/mixed tags, unknown IDs and bounded string errors. Native Linux execution of these Windows-test fixtures was not run.
python tools/check_conventions.py --base origin/mainandgit diff --checkpassed. The required overlap scan could not complete five comparisons: #10861 (referenced-code scanning/syscall routing), #11525 (embedded data tables), #15896 (unwind roots), #15903 (TLS addend validation in this file), and #17105 (undefined-symbol visibility). Their current shared-file patches were reviewed manually; none implements PS4 needed-module collection. Composition with those conflicting branches was not built. Based on current main; affected sources are unchanged between the tested and rebased base revisions. No title-unblock or performance claim.Independent Windows validation by adam25136 compared head
40383cd7e5with the same inFAMOUS Second Son (CUSA00223 01.07) integration onmain1adc0e2f4b. The title declares 28 PS4 needed-module tags. Both conversions succeeded and both runs reached the same unimplemented PS4 multisampled-texture path with zero unresolved imports. The converted executable was 157,696 bytes smaller with the change. The focusedwindows_import_modulesregression failed without the fix and passed with it.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)