Repository navigation
test(libSceAjmi): find the unpatched alias module on macOS - #19689
Merged
oneandonlydean merged 1 commit intoNov 14, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
On macOS the four guest_ajmi_batch tests prepended the alias module directory to DYLD_LIBRARY_PATH. dyld searches DYLD_LIBRARY_PATH by leaf name before the path given to dlopen, so the unpatched variants opened the copy in guest_ajmi_batch_alias_modules instead of libs/unpatched/libSceAjmi.prx, dlsym found no 4MsUK9kAnKg_nid_no_patch_cut and m0xisYC6U2w_nid_no_patch_cut there, and both unpatched tests aborted at line 58. DYLD_FALLBACK_LIBRARY_PATH is only searched after the given path and the install names fail, which matches what LD_LIBRARY_PATH does for a dlopen path that contains a slash on Linux.
Contributor
|
Windows check of head
AI-assisted: yes. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
On macOS
guest_ajmi_batch_inline_unpatchedandguest_ajmi_batch_run_unpatched(added in #16283) abort at line 58:Ajmi batch alias check failed at line 58: 4MsUK9kAnKg_nid_no_patch_cut(andm0xisYC6U2w_nid_no_patch_cutfor run).The tests prepend the alias module directory to
DYLD_LIBRARY_PATH. dyld searchesDYLD_LIBRARY_PATHby leaf name before the path passed todlopen, so the unpatched variant opensguest_ajmi_batch_alias_modules/libSceAjmi.prxinstead oflibs/unpatched/libSceAjmi.prx, anddlsymdoes not find the_cutexport there.DYLD_PRINT_LIBRARIES=1shows the alias copy being loaded for the unpatched path.The macOS branch now uses
DYLD_FALLBACK_LIBRARY_PATH, so dyld tries the explicitdlopenpath before the fallback directory list. The change is limited to the Apple CTest environment.Tested
macOS 27.2, Apple M4 (MacBook Air), x86-64 Release under Rosetta 2, on main
117ff62d9bplus the open macOS build pull requests of our test stack (#11437, #11049, #17425, #16796, #18139, #17878, #17879). CTest, one test at a time:guest_ajmi_batch_inline_unpatchedandguest_ajmi_batch_run_unpatchedabort at line 58; the_nidvariants pass.guest_ajmi_batch_*tests pass.dlopen/dlsymprobe reproduced the missing inline export with the alias directory inDYLD_LIBRARY_PATH. With the same directories inDYLD_FALLBACK_LIBRARY_PATH, it resolved the symbol from the unpatched PRX.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)