test(libSceAjmi): load the batch alias modules without preloading the unpatched ones #24115
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24115"
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 Romannachwievor on 2026-11-20T06:37:56Z.
Title: test(libSceAjmi): load the batch alias modules without preloading the unpatched ones
What
Since #21533 the
nidvariants ofguest_ajmi_batch_inline,guest_ajmi_batch_run,guest_ajmi_batch_controlandguest_ajmi_batch_splitabort on macOS:guest_ajmi_batch_aliases_testslinkslibSceAjmiandlibc, but it never calls either of them: it only takesdecltypeof the exports and loads the modules withdlopen. On macOS ld64 keeps both as load commands, so the unpatchedlibSceAjmi.prx,libSceAjm.native.prx,libkernel.prxandlibc.prxare already loaded through@rpathwhen the test starts. dyld then resolves the@rpath/libSceAjm.native.prxdependency of the patched alias module to the unpatched image that is already loaded (DYLD_PRINT_SEARCHINGshowsfound: already-loaded-by-rpath), instead of the patched copy next to it. The unpatched copy exportssceAjmBatchCancelrather thanNVDXiUesSbA, so the bind fails. Before #21533libSceAjmidid not depend onlibSceAjm.native, so the stale binding was never hit. On Linux the link drops unused libraries, so nothing is preloaded there.Linking only
libcis not enough. Then the patchedlibkernel.prxin the alias directory binds its libc imports against the unpatchedlibc.prxthat the test still preloads (Symbol not found: _H480xkq8iKk). This change links the test the wayguest_ajmi_lifecycle_aliases_tests,guest_ajmi_parser_aliases_testsandguest_ajmi_submission_testsalready are:${CMAKE_DL_LIBS}everywhere, pluslibcon Windows only. Each variant then loads a consistent set of modules from its own directory.Tested
macOS 26.5, Apple M1, x86_64 Release under Rosetta 2, on main
a4d1053d4bplus #17425 and #11049.guest_ajmi_batch_*_nidtests fail with the error above, and the four_unpatchedones pass.ctest -R '^guest_ajmi_batch_(inline|run|control|split)_(nid|unpatched)$'passes 8 of 8, three runs in a row.ctest -R '^guest_ajmi'passes 27 of 27.otool -Lon the test binary now lists no.prx.python3 tools/check_conventions.py --base origin/mainpasses on this branch.240d7aa391and this branch:ctest -R '^guest_ajmi'passes 27 of 27 on both, three runs each.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)AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T06:50:28Z.
Review: APPROVED
Reviewed — looks good
The change aligns the batch alias test’s link dependencies with the existing AJMI alias tests; I found no blocking defects in the reviewed source.
What I ran
Reviewed head
6c37c330f9ba73722ac915b3d53907fccb75c810. I read the prepared description, commit summary, manifest and diff, then inspected the changed CMake context and the three referenced alias-test CMake files throughrepo_read.py. I did not run build or test commands.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The report’s macOS and Linux test results were author-reported and not independently run. Windows behavior was not tested. The only changed file,
core/libs/prx/libSceAjmi/CMakeLists.txt, was read in full; no files were excluded by the manifest.To get this to a good state
Nothing is required.