fix(prx): keep forwarding exports from binding to themselves on Linux #13730

Merged
GiannisG1 merged 1 commit from upstream-pr/13730 into main 2026-11-16 13:37:48 +00:00
GiannisG1 commented 2026-10-31 02:59:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-10-31T02:59:09Z.


What

Six libraries forward an export to another library's function of the same NID:

Library Export Calls
libScePosixForWebKit opendir, closedir, readdir, readdir_r (#12386, *_nid_disambig1_nid_postfix) libc's opendir_nid_postfix …
libSceAmpr sceAmprWcstombsS (sZLrjx-yEx4) libc's wcstombs_s_nid_postfix (sZLrjx-yEx4)
libkernel_sys AIO writes in Aio.cpp (and its own unimplemented pwrite_nid_postfix, C2kJ-byS5rM) libkernel's pwrite_nid_disambig1_nid_postfix (C2kJ-byS5rM)
libkernel_web _dup2 (W8f1adVl+48), _execve (ScfDTOqLOMw), _execvpe (-3nj+K1elI0), *_nid_disambig1_nid_postfix (418e5c817b, 2026-11-07) libkernel_sys's _dup2_nid_postfix, _execve_nid_postfix, _execvpe_nid_postfix (same NIDs)
libSceFreeTypeOt FT_Stroker_Export (2rcvKZfm5rI, 4a71da0821, on main since 2026-11-12) libSceFreeType's FT_Stroker_Export_nid_postfix (same NID)
libSceLibcInternal aligned new[] nothrow (s2eGsgUF9vk) and aligned delete[] (v09ZcAhZzSc) in AlignedNew.cpp (#14240); the ten std::numpunct<char> members in Numpunct.cpp (#14373): decimal_point, thousands_sep, grouping, truename, falsename and their do_ versions; time_put<wchar_t>::_Getcat (bF2uVCqVhBY) in FacetPut.cpp (8cde12b69e, on main since 2026-11-15) libc's _ZnamSt11align_val_tRKSt9nothrow_t_nid_postfix and _ZdaPvSt11align_val_t_nid_postfix; libc's _ZNKSt8numpunctIcE…_nid_postfix; libc's _ZNSt8time_putIw…7_Getcat…_nid_postfix (same NIDs)

After NID patching the import and the library's own export have the same name, for example ay3uROQAc5A in libScePosixForWebKit (nm -D: U ay3uROQAc5A and T ay3uROQAc5A). On Linux the import binds to the first definition in the lookup scope, and when the library comes before the provider it binds to its own export. libScePosixForWebKit's opendir is jmp ay3uROQAc5A@plt, so it jumps to itself forever: Apotris (PPSA98513), FFTARecomp (PPSA98512) and DevilutionX (PPSA98514) hang at start at about 95% of one core with no system calls, and gdb samples are always in opendir_nid_disambig1_nid_postfix or that PLT entry. With LD_PRELOAD of the patched libc.prx, which puts libc first in the scope, Apotris starts. sceAmprWcstombsS, libSceLibcInternal's two aligned forwarders, libkernel_web's three and libSceFreeTypeOt's one can loop the same way, and an AIO write can reach libkernel_sys's NotImplemented pwrite. PE and Mach-O imports name their library, so Windows and macOS don't have this.

Each provider now keeps the body in a _nid_no_patch function (OpenDirectory, ReadDirectory, ReadDirectoryEntry, CloseDirectory, WideToMultibyteChecked, AlignedArrayNewNothrow, AlignedArrayDelete, the ten Numpunct… functions such as NumpunctDecimalPoint and NumpunctDoDecimalPoint, libkernel_sys's GuestDup2, GuestExecve and GuestExecvpe, libSceFreeType's StrokerExport, libc's LibcWideTimePutGetcat, and #9019's PosixPwrite), its export calls that function, and the forwarders call it too. The body has to move, because a _nid_no_patch wrapper that called the exported name could itself be interposed. Nothing changes in what the functions do.

patched_self_imports (Linux, depends on libs, like windows_import_identity) reads the dynamic symbols of every .prx in core/libs/libs and fails for an import whose name the same library exports. Without the fixes it reports the eight names of the first four rows, since #14373 the ten numpunct<char> members, since 418e5c817b libkernel_web's three, since 4a71da0821 libSceFreeTypeOt's one, and since 8cde12b69e libSceLibcInternal's time_put<wchar_t>::_Getcat (the first 21 are the names nm -D showed both imported and exported in the patched libraries of main 3a0a54bbd8; the last two are what the test printed on main 4a590b5085 and b7aeb6f406 with the other fixes in):

libSceLibcInternal.prx imports s2eGsgUF9vk, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports v09ZcAhZzSc, a name it also exports, so the import can bind to its own export
libSceAmpr.prx imports sZLrjx-yEx4, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports J0kng1yac3M, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports XepdqehVYe4, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports ay3uROQAc5A, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports lybyyKtP54c, a name it also exports, so the import can bind to its own export
libkernel_sys.prx imports C2kJ-byS5rM, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports 3+VwUA8-QPI, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports JWplGh2O0Rs, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports JXzQGOtumdM, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports QGSIlqfIU2c, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports cnNz2ftNwEU, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports fXUuZEw7C24, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports klWxQ2nKAHY, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports nRf0VQ++OEw, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports ozLi0i4r6ds, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports zv1EMhI7R1c, a name it also exports, so the import can bind to its own export
libkernel_web.prx imports -3nj+K1elI0, a name it also exports, so the import can bind to its own export
libkernel_web.prx imports ScfDTOqLOMw, a name it also exports, so the import can bind to its own export
libkernel_web.prx imports W8f1adVl+48, a name it also exports, so the import can bind to its own export
libSceFreeTypeOt.prx imports 2rcvKZfm5rI, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports bF2uVCqVhBY, a name it also exports, so the import can bind to its own export

With this PR: No patched library imports a name it exports (413 libraries).

Landing order (CONTRIBUTING: overlapping PRs agree an order): #9019 is merged (0db469c769), and this PR's head merges cleanly with current main.

  • #9019 gave libkernel's pwrite the PosixPwrite_nid_no_patch helper. Since the rebase onto d63781e9ce this PR no longer carries that hunk; it only calls the helper from libkernel_sys's AIO write.
  • Open PRs next to these lines, none implementing the same thing: #18135 adds functions at the same place in libc's LocaleSupport.cpp (both blocks kept; whichever merges second rebases, and I'll do it for this one); #18190 and #18112 are stacked on this PR's commit and rebase after it; #16823 and #17865 add code next to libSceFreeTypeOt's FT_Stroker_Export forwarder (adjacent lines, not the same function); #20047 restores libSceFreeTypeOt's FT_Outline_Get_Bitmap forward (#19411, reverted by #19762 because it imported its own NID 4RRjK-Wd1lU) with the same convention as here, and merges cleanly with it. #17300 renames libSceLibcInternal's inventory placeholders, among them the time_put<wchar_t>::_Getcat NID that main has implemented since 8cde12b69e (it conflicts with main there, not with a line of this PR). #18659 (_wait4) was merged first on 2026-11-12, and this head is rebased over it; #18122 was re-scoped the same day and no longer forwards anything.
  • #12700 and #12965 rewrap pwrite's body for cancellation, which meets #9019's lines in main, not a line of this PR's own.

Tested

Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, BUILD_TESTING=ON, head 6c5bee0282 on main b7aeb6f406. The titles ran on earlier heads, before the rebases that added the aligned new/delete, the numpunct<char>, the libkernel_web, the libSceFreeTypeOt and the time_put forwarders: the first head fe58f461d6, which differs only in the name of the pwrite helper and where the test is registered, and e9e816f6c7 for I Wanna Be The Guy.

Catalog titles, converted with --to-intel, 60 s each under Xvfb on an NVIDIA GTX 1050 Ti (580.178.04):

Title main this PR
Apotris (PPSA98513) one log line, no window, about 95% of a core until killed starts (Tilengine, its GL layer) and presents
FFTARecomp (PPSA98512) the same hang starts and presents, then stops on this GPU's missing fragment barycentrics (#9387's area)
DevilutionX (PPSA98514) the same hang starts and presents, then stops on this GPU's missing mesh shaders (#9356's area)
Source Port (PPSA20040) no window; its main thread sits in the same opendir starts and presents, then exits 0 without the user's game files
I Wanna Be The Guy: Remastered (PPSA99616) one black frame, then the same loop in opendir (gdb) title screen at about 50 FPS and gameplay, played on the real display with an Xbox controller, on this head (e9e816f6c7)

On this head: rebased onto b7aeb6f406, patched_self_imports failed with the bF2uVCqVhBY line before the time_put fix and passes with it (413 libraries); guest_locale and guest_libc_internal_facet_put pass. All tests once and every GPU test on each of the three devices, under Xvfb, against a --full run of main 3a0a54bbd8: NVIDIA GTX 1050 Ti 5621 run, 0 failed; Intel HD Graphics 630 (Mesa 25.2.8) 1822 run, 9 failed; llvmpipe 1822 run, 11 failed. Run alone three times each, five of those pass 3/3 (agc_driver_frame_replay_rewind_copy, agc_driver_runtime_buffer_spans_x{2,3,4}_spans, guest_kernel_sys_paths_readlinkat_limits). The other 15 fail 3/3 alone, and fail the same way 3/3 on unmodified main b7aeb6f406 built on the same machine: on both devices agc_draw_input_mirrors and agc_draw_input_reuse; on the HD Graphics 630 agc_driver_gcn_display_present and …_present_trigger (no DRI3 under Xvfb), agc_driver_image_sample_lod_clamp and the three agc_driver_native_color_{readback,snapshot,snapshot_refusals}; on llvmpipe agc_driver_coherent_atomic_loads_enabled (timeout), agc_driver_global_atomic_csub, agc_driver_host_write_shadowed_unit, agc_driver_stencil_copy_draw and agc_driver_scattered_runs ("allocation failure closed the backing descriptor" on both; on this head one earlier set of three ended in an exception instead). guest_icu_recovered_signatures_tests does not link on b7aeb6f406 itself (fixed on main by #20844).

The tests nearest to the changed code (patched_self_imports, the directory, multibyte, POSIX-for-WebKit, AIO, Ampr, aligned new/delete, numpunct, locale, FreeType and guest_kernel_web_forwards) are in that run and pass (the suite runs a test on one device when the --full run showed it does not depend on the GPU; patched_self_imports ran on all three). check_skips.py names no unexpected skip on any device. check_conventions.py, check_test_registration.py, check_main_sync.py, check_compile.py and git diff --check are clean; pr_overlap.py --branch lists only the PRs in the landing-order paragraph.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (#9019 is merged). Order with the open overlaps, asked of each author on 2026-11-12: #18190: agreed, this PR first, #18190 rebases onto it (answer); #18135: proposed that the first one merged stays and the other rebases, no answer yet (asked). No longer overlapping: #18659 was merged first on 2026-11-12 and this head is rebased over it, as its author had agreed either way (answer); #18122 dropped its forwarding layer after agreeing to go second (answer)
  • Fixes: none
  • Unblocks: PPSA98513 #10209, PPSA98512 #9758
  • GPUs tested: n/a (no AGC, shader recompiler or VideoOut change); the suite's GPU tests ran on NVIDIA GTX 1050 Ti (580.178.04), Intel HD Graphics 630 (Mesa 25.2.8) and llvmpipe (Mesa 25.2.8), Linux Mint 22.3
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5093871351 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730). Originally posted by [GiannisG1](https://github.com/GiannisG1) on 2026-10-31T02:59:09Z. --- ### What Six libraries forward an export to another library's function of the same NID: | Library | Export | Calls | |---|---|---| | libScePosixForWebKit | `opendir`, `closedir`, `readdir`, `readdir_r` (#12386, `*_nid_disambig1_nid_postfix`) | libc's `opendir_nid_postfix` … | | libSceAmpr | `sceAmprWcstombsS` (`sZLrjx-yEx4`) | libc's `wcstombs_s_nid_postfix` (`sZLrjx-yEx4`) | | libkernel_sys | AIO writes in `Aio.cpp` (and its own unimplemented `pwrite_nid_postfix`, `C2kJ-byS5rM`) | libkernel's `pwrite_nid_disambig1_nid_postfix` (`C2kJ-byS5rM`) | | libkernel_web | `_dup2` (`W8f1adVl+48`), `_execve` (`ScfDTOqLOMw`), `_execvpe` (`-3nj+K1elI0`), `*_nid_disambig1_nid_postfix` (418e5c817b, 2026-11-07) | libkernel_sys's `_dup2_nid_postfix`, `_execve_nid_postfix`, `_execvpe_nid_postfix` (same NIDs) | | libSceFreeTypeOt | `FT_Stroker_Export` (`2rcvKZfm5rI`, 4a71da0821, on `main` since 2026-11-12) | libSceFreeType's `FT_Stroker_Export_nid_postfix` (same NID) | | libSceLibcInternal | aligned `new[]` nothrow (`s2eGsgUF9vk`) and aligned `delete[]` (`v09ZcAhZzSc`) in `AlignedNew.cpp` (#14240); the ten `std::numpunct<char>` members in `Numpunct.cpp` (#14373): `decimal_point`, `thousands_sep`, `grouping`, `truename`, `falsename` and their `do_` versions; `time_put<wchar_t>::_Getcat` (`bF2uVCqVhBY`) in `FacetPut.cpp` (8cde12b69e, on `main` since 2026-11-15) | libc's `_ZnamSt11align_val_tRKSt9nothrow_t_nid_postfix` and `_ZdaPvSt11align_val_t_nid_postfix`; libc's `_ZNKSt8numpunctIcE…_nid_postfix`; libc's `_ZNSt8time_putIw…7_Getcat…_nid_postfix` (same NIDs) | After NID patching the import and the library's own export have the same name, for example `ay3uROQAc5A` in libScePosixForWebKit (`nm -D`: `U ay3uROQAc5A` and `T ay3uROQAc5A`). On Linux the import binds to the first definition in the lookup scope, and when the library comes before the provider it binds to its own export. libScePosixForWebKit's `opendir` is `jmp ay3uROQAc5A@plt`, so it jumps to itself forever: Apotris (PPSA98513), FFTARecomp (PPSA98512) and DevilutionX (PPSA98514) hang at start at about 95% of one core with no system calls, and gdb samples are always in `opendir_nid_disambig1_nid_postfix` or that PLT entry. With `LD_PRELOAD` of the patched `libc.prx`, which puts libc first in the scope, Apotris starts. `sceAmprWcstombsS`, libSceLibcInternal's two aligned forwarders, libkernel_web's three and libSceFreeTypeOt's one can loop the same way, and an AIO write can reach libkernel_sys's `NotImplemented` pwrite. PE and Mach-O imports name their library, so Windows and macOS don't have this. Each provider now keeps the body in a `_nid_no_patch` function (`OpenDirectory`, `ReadDirectory`, `ReadDirectoryEntry`, `CloseDirectory`, `WideToMultibyteChecked`, `AlignedArrayNewNothrow`, `AlignedArrayDelete`, the ten `Numpunct…` functions such as `NumpunctDecimalPoint` and `NumpunctDoDecimalPoint`, libkernel_sys's `GuestDup2`, `GuestExecve` and `GuestExecvpe`, libSceFreeType's `StrokerExport`, libc's `LibcWideTimePutGetcat`, and #9019's `PosixPwrite`), its export calls that function, and the forwarders call it too. The body has to move, because a `_nid_no_patch` wrapper that called the exported name could itself be interposed. Nothing changes in what the functions do. `patched_self_imports` (Linux, depends on `libs`, like `windows_import_identity`) reads the dynamic symbols of every `.prx` in `core/libs/libs` and fails for an import whose name the same library exports. Without the fixes it reports the eight names of the first four rows, since #14373 the ten `numpunct<char>` members, since 418e5c817b libkernel_web's three, since 4a71da0821 libSceFreeTypeOt's one, and since 8cde12b69e libSceLibcInternal's `time_put<wchar_t>::_Getcat` (the first 21 are the names `nm -D` showed both imported and exported in the patched libraries of `main` `3a0a54bbd8`; the last two are what the test printed on `main` `4a590b5085` and `b7aeb6f406` with the other fixes in): ``` libSceLibcInternal.prx imports s2eGsgUF9vk, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports v09ZcAhZzSc, a name it also exports, so the import can bind to its own export libSceAmpr.prx imports sZLrjx-yEx4, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports J0kng1yac3M, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports XepdqehVYe4, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports ay3uROQAc5A, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports lybyyKtP54c, a name it also exports, so the import can bind to its own export libkernel_sys.prx imports C2kJ-byS5rM, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports 3+VwUA8-QPI, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports JWplGh2O0Rs, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports JXzQGOtumdM, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports QGSIlqfIU2c, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports cnNz2ftNwEU, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports fXUuZEw7C24, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports klWxQ2nKAHY, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports nRf0VQ++OEw, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports ozLi0i4r6ds, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports zv1EMhI7R1c, a name it also exports, so the import can bind to its own export libkernel_web.prx imports -3nj+K1elI0, a name it also exports, so the import can bind to its own export libkernel_web.prx imports ScfDTOqLOMw, a name it also exports, so the import can bind to its own export libkernel_web.prx imports W8f1adVl+48, a name it also exports, so the import can bind to its own export libSceFreeTypeOt.prx imports 2rcvKZfm5rI, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports bF2uVCqVhBY, a name it also exports, so the import can bind to its own export ``` With this PR: `No patched library imports a name it exports (413 libraries)`. Landing order (CONTRIBUTING: overlapping PRs agree an order): #9019 is merged (`0db469c769`), and this PR's head merges cleanly with current `main`. - #9019 gave libkernel's `pwrite` the `PosixPwrite_nid_no_patch` helper. Since the rebase onto `d63781e9ce` this PR no longer carries that hunk; it only calls the helper from libkernel_sys's AIO write. - Open PRs next to these lines, none implementing the same thing: #18135 adds functions at the same place in libc's `LocaleSupport.cpp` (both blocks kept; whichever merges second rebases, and I'll do it for this one); #18190 and #18112 are stacked on this PR's commit and rebase after it; #16823 and #17865 add code next to libSceFreeTypeOt's `FT_Stroker_Export` forwarder (adjacent lines, not the same function); #20047 restores libSceFreeTypeOt's `FT_Outline_Get_Bitmap` forward (#19411, reverted by #19762 because it imported its own NID `4RRjK-Wd1lU`) with the same convention as here, and merges cleanly with it. #17300 renames libSceLibcInternal's inventory placeholders, among them the `time_put<wchar_t>::_Getcat` NID that `main` has implemented since 8cde12b69e (it conflicts with `main` there, not with a line of this PR). #18659 (`_wait4`) was merged first on 2026-11-12, and this head is rebased over it; #18122 was re-scoped the same day and no longer forwards anything. - #12700 and #12965 rewrap `pwrite`'s body for cancellation, which meets #9019's lines in `main`, not a line of this PR's own. ### Tested Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, `BUILD_TESTING=ON`, head `6c5bee0282` on `main` `b7aeb6f406`. The titles ran on earlier heads, before the rebases that added the aligned `new`/`delete`, the `numpunct<char>`, the libkernel_web, the libSceFreeTypeOt and the `time_put` forwarders: the first head `fe58f461d6`, which differs only in the name of the pwrite helper and where the test is registered, and `e9e816f6c7` for I Wanna Be The Guy. Catalog titles, converted with `--to-intel`, 60 s each under Xvfb on an NVIDIA GTX 1050 Ti (580.178.04): | Title | `main` | this PR | |---|---|---| | Apotris (PPSA98513) | one log line, no window, about 95% of a core until killed | starts (Tilengine, its GL layer) and presents | | FFTARecomp (PPSA98512) | the same hang | starts and presents, then stops on this GPU's missing fragment barycentrics (#9387's area) | | DevilutionX (PPSA98514) | the same hang | starts and presents, then stops on this GPU's missing mesh shaders (#9356's area) | | Source Port (PPSA20040) | no window; its main thread sits in the same `opendir` | starts and presents, then exits 0 without the user's game files | | I Wanna Be The Guy: Remastered (PPSA99616) | one black frame, then the same loop in `opendir` (gdb) | title screen at about 50 FPS and gameplay, played on the real display with an Xbox controller, on this head (`e9e816f6c7`) | On this head: rebased onto `b7aeb6f406`, `patched_self_imports` failed with the `bF2uVCqVhBY` line before the `time_put` fix and passes with it (413 libraries); `guest_locale` and `guest_libc_internal_facet_put` pass. All tests once and every GPU test on each of the three devices, under Xvfb, against a `--full` run of `main` `3a0a54bbd8`: NVIDIA GTX 1050 Ti 5621 run, 0 failed; Intel HD Graphics 630 (Mesa 25.2.8) 1822 run, 9 failed; llvmpipe 1822 run, 11 failed. Run alone three times each, five of those pass 3/3 (`agc_driver_frame_replay_rewind_copy`, `agc_driver_runtime_buffer_spans_x{2,3,4}_spans`, `guest_kernel_sys_paths_readlinkat_limits`). The other 15 fail 3/3 alone, and fail the same way 3/3 on unmodified `main` `b7aeb6f406` built on the same machine: on both devices `agc_draw_input_mirrors` and `agc_draw_input_reuse`; on the HD Graphics 630 `agc_driver_gcn_display_present` and `…_present_trigger` (no DRI3 under Xvfb), `agc_driver_image_sample_lod_clamp` and the three `agc_driver_native_color_{readback,snapshot,snapshot_refusals}`; on llvmpipe `agc_driver_coherent_atomic_loads_enabled` (timeout), `agc_driver_global_atomic_csub`, `agc_driver_host_write_shadowed_unit`, `agc_driver_stencil_copy_draw` and `agc_driver_scattered_runs` ("allocation failure closed the backing descriptor" on both; on this head one earlier set of three ended in an exception instead). `guest_icu_recovered_signatures_tests` does not link on `b7aeb6f406` itself (fixed on `main` by #20844). The tests nearest to the changed code (`patched_self_imports`, the directory, multibyte, POSIX-for-WebKit, AIO, Ampr, aligned `new`/`delete`, `numpunct`, locale, FreeType and `guest_kernel_web_forwards`) are in that run and pass (the suite runs a test on one device when the `--full` run showed it does not depend on the GPU; `patched_self_imports` ran on all three). `check_skips.py` names no unexpected skip on any device. `check_conventions.py`, `check_test_registration.py`, `check_main_sync.py`, `check_compile.py` and `git diff --check` are clean; `pr_overlap.py --branch` lists only the PRs in the landing-order paragraph. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none (#9019 is merged). Order with the open overlaps, asked of each author on 2026-11-12: #18190: agreed, this PR first, #18190 rebases onto it ([answer](https://github.com/boykopovar/AnyPS5/pull/18190#issuecomment-6815480005)); #18135: proposed that the first one merged stays and the other rebases, no answer yet ([asked](https://github.com/boykopovar/AnyPS5/pull/18135#issuecomment-6812170446)). No longer overlapping: #18659 was merged first on 2026-11-12 and this head is rebased over it, as its author had agreed either way ([answer](https://github.com/boykopovar/AnyPS5/pull/18659#issuecomment-6812214241)); #18122 dropped its forwarding layer after agreeing to go second ([answer](https://github.com/boykopovar/AnyPS5/pull/18122#issuecomment-6815480305)) - [x] Fixes: none - [x] Unblocks: PPSA98513 #10209, PPSA98512 #9758 - [x] GPUs tested: n/a (no AGC, shader recompiler or VideoOut change); the suite's GPU tests ran on NVIDIA GTX 1050 Ti (580.178.04), Intel HD Graphics 630 (Mesa 25.2.8) and llvmpipe (Mesa 25.2.8), Linux Mint 22.3 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-31 03:29:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T03:29:19Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The fix is supported by the reported Linux testing, but overlapping open changes need an agreed landing order and two title-unblock entries lack their required discussion references.

What I ran

Reviewed head fe58f461d6a5e7685333adab1ad6c347b914933b against PR base e2df06e661f94d6e63b8f6622c8c58507b0245c1. The live merge preview onto main 6475267b456de6a0a23b230aa751f0b917d12688 was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build locally or run CTest.

git diff --check e2df06e661f94d6e63b8f6622c8c58507b0245c1...fe58f461d6a5e7685333adab1ad6c347b914933b
python3 tools/check_conventions.py --base e2df06e661f94d6e63b8f6622c8c58507b0245c1 --head fe58f461d6a5e7685333adab1ad6c347b914933b --title 'fix(prx): keep forwarding exports from binding to themselves on Linux' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13730-fe58f461d6a5/pr-body.md
python3 tools/pr_stack_check.py 13730 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13730-fe58f461d6a5/stack
python3 tools/pr_abi_audit.py --base e2df06e661f94d6e63b8f6622c8c58507b0245c1 --head refs/pr/13730 --json
python3 tools/pr_test_quality.py --root /tmp/pr-13730-quality --json core/libs/tests/PatchedSelfImports.cpp
python3 tools/pr_overlap.py --branch refs/pr/13730 --repo boykopovar/AnyPS5 --jobs 4
gh pr checks 13730 --repo boykopovar/AnyPS5

Results

Check Result
Diff check Passed.
Conventions and PR template Passed.
Merge preview Clean on current main at 6475267b456de6a0a23b230aa751f0b917d12688.
ABI audit passed_with_warnings; the sceAmprWcstombsS alias warning concerns its explicit NID, while this PR changes only its call body.
Test-quality heuristic and registration Heuristic flagged the C++ test as possibly unregistered; this is a false positive because the changed CMake file registers the target and CTest entry.
Hosted conventions Passed.
Hosted eligibility Passed.
Hosted intake Passed.
Hosted labels Passed.
Hosted library-portability Passed.
Hosted register-context Ubuntu Debug Passed.
Hosted register-context Ubuntu Release Passed.
Hosted relinker Ubuntu Passed.
Hosted relinker Windows Passed.
Hosted relinker ASAN Passed.
Hosted report Passed.
Hosted linux Skipped.
Hosted register-context macOS Debug Pending.
Hosted register-context macOS Release Pending.
Hosted relinker macos-latest, clang++ Pending.
Hosted relinker macOS x86_64 Pending.
Hosted write-watch macOS arm64 Pending.
Hosted write-watch macOS Intel Pending.
Hosted full windows job Passed on latest refresh.
Local build and CTest Not run.
Unedited output excerpts

check_conventions.py:

All conventions checks passed.

The test-quality helper output for the new C++ test:

{
  "findings": [
    {
      "path": "core/libs/tests/PatchedSelfImports.cpp",
      "line": 1,
      "kind": "possible-unregistered-cpp-test",
      "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage."
    }
  ],
  "negative_control_candidates": [],
  "limits": [
    "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
    "A test that passes against base is not by itself proof that the PR test is inadequate.",
    "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
  ]
}

Relevant overlap-scan rows (the scan used current main 6475267b456de6a0a23b230aa751f0b917d12688):

| [PR 7645](https://www.github.com/boykopovar/AnyPS5/pull/7645) | `core/libs/CMakeLists.txt` [L343-344](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/core/libs/CMakeLists.txt#L343-L344) |  |  |
| [PR 9019](https://www.github.com/boykopovar/AnyPS5/pull/9019) | `core/libs/prx/libkernel/File/src/Stdio.cpp` [L1085](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/core/libs/prx/libkernel/File/src/Stdio.cpp#L1085) | `pwrite` |  |
| [PR 12868](https://www.github.com/boykopovar/AnyPS5/pull/12868) | `core/libs/prx/libkernel_sys/Aio.cpp` [L96-98](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/core/libs/prx/libkernel_sys/Aio.cpp#L96-L98) |  |  |

Manual patch inspection found #7645 changes a different CMake hunk, so it is not a substantive overlap here. The scanner could not compare several branches that conflict with the base; this PR's own description also identifies #12700 and #12965 as touching the positioned-write change.

Latest relevant gh pr checks output:

relinker (ubuntu-latest, g++)	pass	2m42s	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227358
relinker (windows-latest, g++)	pass	9m31s	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227403
relinker-asan	pass	2m36s	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227374
register-context (ubuntu-latest, Debug)	pass	30s	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227340
register-context (ubuntu-latest, Release)	pass	26s	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227343
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423228639
register-context (macos-15-intel, Debug)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227369
register-context (macos-15-intel, Release)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227401
relinker (macos-latest, clang++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227502
relinker (macos-latest, clang++, x86_64)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227509
windows	pass	21m55s	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227351
write-watch (macos-15)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227368
write-watch (macos-15-intel)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227336

Negative control

Assertion Change to code under test Did the test fail?
Self-import regression must be detected No negative-control mutation or exact-head test binary was available without building. Not exercised.

Findings

Blocking

  • CONTRIBUTING.md requires authors of overlapping PRs to agree on landing order and record it with Depends on. The live overlap scan found open #9019 changing the pwrite provider path and #12868 changing the AIO call. This PR's description also names #12700 and #12965 as touching the positioned-write code. The checklist currently says Depends on: none, and no coordination is recorded. Please agree on the landing order with the affected authors and update the checklist accordingly.
  • The Unblocks line lists PPSA98514 and PPSA20040 without their Game bring-up discussion references. Add the applicable discussion IDs or remove entries that are not tracked there.

Non-blocking

The description reports substantial Linux and title testing but does not state the exact PR head SHA those results exercised. Please add the full tested head SHA so the evidence can be matched to this revision.

Sources

Not verified

No local compilation, CTest, title launch, console behavior, or negative-control mutation was run. The Linux-specific test is not covered by the hosted Linux job because that job was skipped; macOS and full Windows jobs were pending. The exact PR head used for the author's reported tests is unspecified. The overlap scan could not compare some branches that conflict with the PR base, so they still need manual review before concluding no additional overlap exists.

To get this to a good state

Please coordinate and record the overlap order, complete the missing Game bring-up references, and add the exact tested head SHA. I will rerun the relevant checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5720911384 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730#pullrequestreview-5720911384). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T03:29:19Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The fix is supported by the reported Linux testing, but overlapping open changes need an agreed landing order and two title-unblock entries lack their required discussion references. ## What I ran Reviewed head `fe58f461d6a5e7685333adab1ad6c347b914933b` against PR base `e2df06e661f94d6e63b8f6622c8c58507b0245c1`. The live merge preview onto `main` `6475267b456de6a0a23b230aa751f0b917d12688` was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build locally or run CTest. ```sh git diff --check e2df06e661f94d6e63b8f6622c8c58507b0245c1...fe58f461d6a5e7685333adab1ad6c347b914933b python3 tools/check_conventions.py --base e2df06e661f94d6e63b8f6622c8c58507b0245c1 --head fe58f461d6a5e7685333adab1ad6c347b914933b --title 'fix(prx): keep forwarding exports from binding to themselves on Linux' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13730-fe58f461d6a5/pr-body.md python3 tools/pr_stack_check.py 13730 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13730-fe58f461d6a5/stack python3 tools/pr_abi_audit.py --base e2df06e661f94d6e63b8f6622c8c58507b0245c1 --head refs/pr/13730 --json python3 tools/pr_test_quality.py --root /tmp/pr-13730-quality --json core/libs/tests/PatchedSelfImports.cpp python3 tools/pr_overlap.py --branch refs/pr/13730 --repo boykopovar/AnyPS5 --jobs 4 gh pr checks 13730 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Diff check | Passed. | | Conventions and PR template | Passed. | | Merge preview | Clean on current `main` at `6475267b456de6a0a23b230aa751f0b917d12688`. | | ABI audit | `passed_with_warnings`; the `sceAmprWcstombsS` alias warning concerns its explicit NID, while this PR changes only its call body. | | Test-quality heuristic and registration | Heuristic flagged the C++ test as possibly unregistered; this is a false positive because the changed CMake file registers the target and CTest entry. | | Hosted `conventions` | Passed. | | Hosted `eligibility` | Passed. | | Hosted `intake` | Passed. | | Hosted `labels` | Passed. | | Hosted `library-portability` | Passed. | | Hosted register-context Ubuntu Debug | Passed. | | Hosted register-context Ubuntu Release | Passed. | | Hosted relinker Ubuntu | Passed. | | Hosted relinker Windows | Passed. | | Hosted relinker ASAN | Passed. | | Hosted `report` | Passed. | | Hosted `linux` | Skipped. | | Hosted register-context macOS Debug | Pending. | | Hosted register-context macOS Release | Pending. | | Hosted relinker `macos-latest, clang++` | Pending. | | Hosted relinker macOS x86_64 | Pending. | | Hosted write-watch macOS arm64 | Pending. | | Hosted write-watch macOS Intel | Pending. | | Hosted full `windows` job | Passed on latest refresh. | | Local build and CTest | Not run. | <details> <summary>Unedited output excerpts</summary> `check_conventions.py`: ```text All conventions checks passed. ``` The test-quality helper output for the new C++ test: ```json { "findings": [ { "path": "core/libs/tests/PatchedSelfImports.cpp", "line": 1, "kind": "possible-unregistered-cpp-test", "message": "Changed C++ test source path was not found literally in CMake files; inspect registration, generated source lists, and workflow coverage." } ], "negative_control_candidates": [], "limits": [ "Heuristics can miss weak assertions and can flag valid tests; inspect every finding.", "A test that passes against base is not by itself proof that the PR test is inadequate.", "Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error." ] } ``` Relevant overlap-scan rows (the scan used current `main` `6475267b456de6a0a23b230aa751f0b917d12688`): ```text | [PR 7645](https://www.github.com/boykopovar/AnyPS5/pull/7645) | `core/libs/CMakeLists.txt` [L343-344](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/core/libs/CMakeLists.txt#L343-L344) | | | | [PR 9019](https://www.github.com/boykopovar/AnyPS5/pull/9019) | `core/libs/prx/libkernel/File/src/Stdio.cpp` [L1085](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/core/libs/prx/libkernel/File/src/Stdio.cpp#L1085) | `pwrite` | | | [PR 12868](https://www.github.com/boykopovar/AnyPS5/pull/12868) | `core/libs/prx/libkernel_sys/Aio.cpp` [L96-98](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/core/libs/prx/libkernel_sys/Aio.cpp#L96-L98) | | | ``` Manual patch inspection found #7645 changes a different CMake hunk, so it is not a substantive overlap here. The scanner could not compare several branches that conflict with the base; this PR's own description also identifies #12700 and #12965 as touching the positioned-write change. Latest relevant `gh pr checks` output: ```text relinker (ubuntu-latest, g++) pass 2m42s https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227358 relinker (windows-latest, g++) pass 9m31s https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227403 relinker-asan pass 2m36s https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227374 register-context (ubuntu-latest, Debug) pass 30s https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227340 register-context (ubuntu-latest, Release) pass 26s https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227343 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423228639 register-context (macos-15-intel, Debug) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227369 register-context (macos-15-intel, Release) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227401 relinker (macos-latest, clang++) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227502 relinker (macos-latest, clang++, x86_64) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227509 windows pass 21m55s https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227351 write-watch (macos-15) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227368 write-watch (macos-15-intel) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41162362960/job/124423227336 ``` </details> ## Negative control | Assertion | Change to code under test | Did the test fail? | |---|---|---| | Self-import regression must be detected | No negative-control mutation or exact-head test binary was available without building. | Not exercised. | ## Findings ### Blocking - `CONTRIBUTING.md` requires authors of overlapping PRs to agree on landing order and record it with `Depends on`. The live overlap scan found open #9019 changing the `pwrite` provider path and #12868 changing the AIO call. This PR's description also names #12700 and #12965 as touching the positioned-write code. The checklist currently says `Depends on: none`, and no coordination is recorded. Please agree on the landing order with the affected authors and update the checklist accordingly. - The `Unblocks` line lists `PPSA98514` and `PPSA20040` without their Game bring-up discussion references. Add the applicable discussion IDs or remove entries that are not tracked there. ### Non-blocking The description reports substantial Linux and title testing but does not state the exact PR head SHA those results exercised. Please add the full tested head SHA so the evidence can be matched to this revision. ## Sources - [Overlap-order rule at current `main`](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/CONTRIBUTING.md#L69) - [Required title and discussion format at current `main`](https://github.com/boykopovar/AnyPS5/blob/6475267b456de6a0a23b230aa751f0b917d12688/.github/pull_request_template.md#L17) - [PR #13730 test registration at reviewed head](https://github.com/boykopovar/AnyPS5/blob/fe58f461d6a5e7685333adab1ad6c347b914933b/core/libs/CMakeLists.txt#L344-L350) - [PR #13730 positioned-write provider at reviewed head](https://github.com/boykopovar/AnyPS5/blob/fe58f461d6a5e7685333adab1ad6c347b914933b/core/libs/prx/libkernel/File/src/Stdio.cpp#L1085-L1099) - [PR #13730 AIO call at reviewed head](https://github.com/boykopovar/AnyPS5/blob/fe58f461d6a5e7685333adab1ad6c347b914933b/core/libs/prx/libkernel_sys/Aio.cpp#L96-L98) - [PR #9019 positioned-write provider at its current head](https://github.com/boykopovar/AnyPS5/blob/79b02b3bdbb4301d6f7638d8026b4374b7e22803/core/libs/prx/libkernel/File/src/Stdio.cpp#L1104-L1108) - [PR #12868 retained-file AIO path at its current head](https://github.com/boykopovar/AnyPS5/blob/619546539e534ea4c05e66460f4b79b30d92895a/core/libs/prx/libkernel_sys/Aio.cpp#L112-L116) - [PR #12700 positioned-write changes at its current head](https://github.com/boykopovar/AnyPS5/blob/daa3a810cbb43e399e3912df6bf3edb4221ef98c/core/libs/prx/libkernel/File/src/Stdio.cpp) - [PR #12965 positioned-write changes at its current head](https://github.com/boykopovar/AnyPS5/blob/e01288c9204944ae5befa08a514fb7d93443ac03/core/libs/prx/libkernel/File/src/Stdio.cpp) ## Not verified No local compilation, CTest, title launch, console behavior, or negative-control mutation was run. The Linux-specific test is not covered by the hosted Linux job because that job was skipped; macOS and full Windows jobs were pending. The exact PR head used for the author's reported tests is unspecified. The overlap scan could not compare some branches that conflict with the PR base, so they still need manual review before concluding no additional overlap exists. ## To get this to a good state Please coordinate and record the overlap order, complete the missing Game bring-up references, and add the exact tested head SHA. I will rerun the relevant checks on the updated head.
XairRrR commented 2026-11-02 21:54:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T21:54:13Z.

Review: APPROVED


Reviewed — approved

Moving the eight self-forwarded bodies into _nid_no_patch helpers removes every self-import from the patched libraries on Linux. The new patched_self_imports test passes on the merged tree, and with main's production files it fails and lists exactly those eight names.

What I ran

Head 905617771ee037b6855f27750d9d8480a4e851a4, merged with --no-ff into main 9090972b7e91fd266819cbd77a8b058e177b5682 (merged tree a200042f4212607ed244e8a51a9c4b5ca8ee051e). Debian 13 VM, 32 vCPU Xeon Gold 6136, GCC 14.2.0, Release, Ninja, BUILD_TESTING=ON, lavapipe (Mesa 26.1.6).

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...905617771ee037b6855f27750d9d8480a4e851a4
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "patched_self_imports|guest_directory|guest_opendir2|guest_fdopendir|guest_posix_filesystem|guest_posix_wrap|guest_kernel_sys_aio|guest_aio|guest_ampr|guest_wcsrtombs|guest_libc_internal_aligned_new|guest_new_handler|guest_kernel_sys_pwrite"
# negative control: the 11 production files restored from main
git show 9090972b7e91fd266819cbd77a8b058e177b5682:<path> > <path>
ninja -C build -j32 -l32 libs patched_self_imports_tests
ctest --test-dir build --output-on-failure -R "^patched_self_imports$"
# restore the merged files
git show a200042f4212607ed244e8a51a9c4b5ca8ee051e:<path> > <path>
ninja -C build -j32 -l32 libs patched_self_imports_tests
ctest --test-dir build -V -R "^patched_self_imports$"
git status --porcelain

Results

Check Result
git diff --check Clean
check_conventions.py All conventions checks passed
Configure, build, libs (script) OK
Script test run (3608 tests) No new failures and no timeouts. The 9 known failures also fail on main. The unexpected guest_net_ctl skip also happens on main.
Focused tests (25, listed above) 25/25 pass, the longest is patched_self_imports at 0.99 s
patched_self_imports on the merged tree No patched library imports a name it exports (405 libraries)
Negative control Fails with the eight names from the description
Worktree after restoring git status --porcelain is empty
Validation-layer comparison Not applicable: the change touches no AGC driver, shader recompiler or VideoOut file
Negative control output
1/1 Test #410: patched_self_imports .............***Failed    0.91 sec
libSceAmpr.prx imports sZLrjx-yEx4, a name it also exports, so the import can bind to its own export
libkernel_sys.prx imports C2kJ-byS5rM, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports J0kng1yac3M, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports XepdqehVYe4, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports ay3uROQAc5A, a name it also exports, so the import can bind to its own export
libScePosixForWebKit.prx imports lybyyKtP54c, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports s2eGsgUF9vk, a name it also exports, so the import can bind to its own export
libSceLibcInternal.prx imports v09ZcAhZzSc, a name it also exports, so the import can bind to its own export

Negative control

I restored all 11 non-test files the PR changes from main. The test registration in core/libs/CMakeLists.txt and PatchedSelfImports.cpp stayed as merged. After rebuilding libs, patched_self_imports failed and reported the same eight self-imports the description lists. These include the two libSceLibcInternal ones that B-Howell found in their comment. I then restored the merged files and rebuilt, and the test passed again (405 libraries). The worktree matched the merged tree at the end.

Findings

Blocking

None.

Non-blocking

  • The Depends on line doesn't match the author's comment. In the 2026-10-31 reply to MarcZX10, the author wrote Depends on: #9019, #12868, and said this PR would rebase onto #12868's Aio.cpp structure once that PR lands. The current checklist names only #9019. The new call at core/libs/prx/libkernel_sys/Aio.cpp:98 is the line #12868 restructures, according to MarcZX10's review. Either restore #12868 on the line or say on the PR that the order with #12868 no longer matters. This keeps the landing-order record CONTRIBUTING asks for consistent.
  • The new helpers use the default ABI. WideToMultibyteChecked_nid_no_patch (core/libs/prx/libc/src/Multibyte.cpp:372), AlignedArrayNewNothrow_nid_no_patch and AlignedArrayDelete_nid_no_patch (core/libs/prx/libc/src/StdioExtras.cpp:171, :191) and PosixPwrite_nid_no_patch (core/libs/prx/libkernel/File/src/Stdio.cpp:1117) have no APS5_VABI. The directory helpers do have it. All callers are host code, and each declaration matches its definition, so this is correct. It is only noted as an inconsistency between the helpers.

Not verified

  • No title was run; the hang fix for Apotris, FFTARecomp and the other titles rests on the author's report.
  • The Windows and macOS builds of this head were not built here. MarcZX10's review reports the hosted Windows job passing on an earlier head, fe58f461d6.
  • I could not check that the PR merges with #9019 without conflict, which the author reports from git merge-tree. That needs the other PR's head, and the sandbox has no network.
  • GPU tests on vendors other than lavapipe were not run; the change touches no GPU path.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5743939459 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730#pullrequestreview-5743939459). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T21:54:13Z. **Review:** APPROVED --- # Reviewed — approved Moving the eight self-forwarded bodies into `_nid_no_patch` helpers removes every self-import from the patched libraries on Linux. The new `patched_self_imports` test passes on the merged tree, and with `main`'s production files it fails and lists exactly those eight names. ## What I ran Head `905617771ee037b6855f27750d9d8480a4e851a4`, merged with `--no-ff` into `main` `9090972b7e91fd266819cbd77a8b058e177b5682` (merged tree `a200042f4212607ed244e8a51a9c4b5ca8ee051e`). Debian 13 VM, 32 vCPU Xeon Gold 6136, GCC 14.2.0, Release, Ninja, `BUILD_TESTING=ON`, lavapipe (Mesa 26.1.6). ```sh git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...905617771ee037b6855f27750d9d8480a4e851a4 python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "patched_self_imports|guest_directory|guest_opendir2|guest_fdopendir|guest_posix_filesystem|guest_posix_wrap|guest_kernel_sys_aio|guest_aio|guest_ampr|guest_wcsrtombs|guest_libc_internal_aligned_new|guest_new_handler|guest_kernel_sys_pwrite" # negative control: the 11 production files restored from main git show 9090972b7e91fd266819cbd77a8b058e177b5682:<path> > <path> ninja -C build -j32 -l32 libs patched_self_imports_tests ctest --test-dir build --output-on-failure -R "^patched_self_imports$" # restore the merged files git show a200042f4212607ed244e8a51a9c4b5ca8ee051e:<path> > <path> ninja -C build -j32 -l32 libs patched_self_imports_tests ctest --test-dir build -V -R "^patched_self_imports$" git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | Clean | | `check_conventions.py` | All conventions checks passed | | Configure, build, `libs` (script) | OK | | Script test run (3608 tests) | No new failures and no timeouts. The 9 known failures also fail on `main`. The unexpected `guest_net_ctl` skip also happens on `main`. | | Focused tests (25, listed above) | 25/25 pass, the longest is `patched_self_imports` at 0.99 s | | `patched_self_imports` on the merged tree | `No patched library imports a name it exports (405 libraries)` | | Negative control | Fails with the eight names from the description | | Worktree after restoring | `git status --porcelain` is empty | | Validation-layer comparison | Not applicable: the change touches no AGC driver, shader recompiler or VideoOut file | <details><summary>Negative control output</summary> ``` 1/1 Test #410: patched_self_imports .............***Failed 0.91 sec libSceAmpr.prx imports sZLrjx-yEx4, a name it also exports, so the import can bind to its own export libkernel_sys.prx imports C2kJ-byS5rM, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports J0kng1yac3M, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports XepdqehVYe4, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports ay3uROQAc5A, a name it also exports, so the import can bind to its own export libScePosixForWebKit.prx imports lybyyKtP54c, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports s2eGsgUF9vk, a name it also exports, so the import can bind to its own export libSceLibcInternal.prx imports v09ZcAhZzSc, a name it also exports, so the import can bind to its own export ``` </details> ## Negative control I restored all 11 non-test files the PR changes from `main`. The test registration in `core/libs/CMakeLists.txt` and `PatchedSelfImports.cpp` stayed as merged. After rebuilding `libs`, `patched_self_imports` failed and reported the same eight self-imports the description lists. These include the two libSceLibcInternal ones that B-Howell found in their comment. I then restored the merged files and rebuilt, and the test passed again (405 libraries). The worktree matched the merged tree at the end. ## Findings ### Blocking None. ### Non-blocking - **The `Depends on` line doesn't match the author's comment.** In the 2026-10-31 reply to MarcZX10, the author wrote `Depends on: #9019, #12868`, and said this PR would rebase onto #12868's `Aio.cpp` structure once that PR lands. The current checklist names only #9019. The new call at `core/libs/prx/libkernel_sys/Aio.cpp:98` is the line #12868 restructures, according to MarcZX10's review. Either restore #12868 on the line or say on the PR that the order with #12868 no longer matters. This keeps the landing-order record CONTRIBUTING asks for consistent. - **The new helpers use the default ABI.** `WideToMultibyteChecked_nid_no_patch` (`core/libs/prx/libc/src/Multibyte.cpp:372`), `AlignedArrayNewNothrow_nid_no_patch` and `AlignedArrayDelete_nid_no_patch` (`core/libs/prx/libc/src/StdioExtras.cpp:171`, `:191`) and `PosixPwrite_nid_no_patch` (`core/libs/prx/libkernel/File/src/Stdio.cpp:1117`) have no `APS5_VABI`. The directory helpers do have it. All callers are host code, and each declaration matches its definition, so this is correct. It is only noted as an inconsistency between the helpers. ## Not verified - No title was run; the hang fix for Apotris, FFTARecomp and the other titles rests on the author's report. - The Windows and macOS builds of this head were not built here. MarcZX10's review reports the hosted Windows job passing on an earlier head, `fe58f461d6`. - I could not check that the PR merges with #9019 without conflict, which the author reports from `git merge-tree`. That needs the other PR's head, and the sandbox has no network. - GPU tests on vendors other than lavapipe were not run; the change touches no GPU path. <!-- anyps5-bots job=2299 head=905617771ee037b6855f27750d9d8480a4e851a4 -->
gabichuuuuu commented 2026-11-07 23:30:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-07T23:30:23Z.

Review: COMMENTED


Read dee26988a2 against main.

Still needed: current main still has all eight forwarders (libScePosixForWebKit Export.cpp:281-294, sceAmprWcstombsS, libSceLibcInternal AlignedNew.cpp:9-17, libkernel_sys Aio.cpp:104). Each body moves unchanged into a _nid_no_patch function that NID patching leaves alone, and both the export and the forwarder call it, so no import shares a name with its own library's export and behaviour doesn't change on any OS. Every new helper is declared extern "C" in a header the defining file includes (Multibyte.cpp now includes General.hpp for that). No finding in the code.

The windows check is red because it was cancelled at the 45-minute limit while still compiling, so this head has no Windows result; it needs a re-run.

The new test has never run in CI. patched_self_imports is registered only on Linux and the hosted linux job is skipped on pull requests. The branch is about 4,200 commits behind main, and #14240 already added two self-forwarders after an earlier push, so a rebase and a run of patched_self_imports on the result would catch any that landed since.

Not run here; this is from reading the code.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5815565675 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730#pullrequestreview-5815565675). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-07T23:30:23Z. **Review:** COMMENTED --- Read `dee26988a2` against `main`. Still needed: current `main` still has all eight forwarders (libScePosixForWebKit `Export.cpp:281-294`, `sceAmprWcstombsS`, libSceLibcInternal `AlignedNew.cpp:9-17`, libkernel_sys `Aio.cpp:104`). Each body moves unchanged into a `_nid_no_patch` function that NID patching leaves alone, and both the export and the forwarder call it, so no import shares a name with its own library's export and behaviour doesn't change on any OS. Every new helper is declared `extern "C"` in a header the defining file includes (`Multibyte.cpp` now includes `General.hpp` for that). No finding in the code. **The `windows` check is red** because it was cancelled at the 45-minute limit while still compiling, so this head has no Windows result; it needs a re-run. **The new test has never run in CI.** `patched_self_imports` is registered only on Linux and the hosted `linux` job is skipped on pull requests. The branch is about 4,200 commits behind `main`, and #14240 already added two self-forwarders after an earlier push, so a rebase and a run of `patched_self_imports` on the result would catch any that landed since. Not run here; this is from reading the code. AI-assisted: yes.
gabichuuuuu commented 2026-11-08 11:35:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T11:35:27Z.

Review: COMMENTED


Windows check of head 0da91e53be, merged onto main 105c9e4d91 (clean merge). The windows CI job hasn't finished on this head, so this fills that gap.

Setup: Windows 11, WinLibs GCC 15.2 (x86_64-ucrt-posix-seh), Release, full build with BUILD_TESTING=ON.

  • Build: all 8,462 targets build, with no warnings in the files this PR changes. That includes the moved numpunct<char> bodies in LocaleSupport.cpp and Numpunct.cpp and the new declarations in GuestLocale.hpp.
  • Tests: your focused set as it's registered on Windows. That is 38 tests, each run once, and all pass: the directory, opendir2, fdopendir, POSIX-for-WebKit, AIO, Ampr, wcsrtombs, aligned new/delete, new-handler, nid_patcher_symbol_versions, guest_libc_internal_numpunct and locale tests. patched_self_imports is registered only on Linux, so it didn't run here.

I ran no negative control: a Windows import is bound to the DLL it names, so the self-binding this fixes can't happen on PE. What this shows is that moving the bodies into _nid_no_patch functions changes nothing on Windows.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5817711976 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730#pullrequestreview-5817711976). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-08T11:35:27Z. **Review:** COMMENTED --- Windows check of head `0da91e53be`, merged onto `main` `105c9e4d91` (clean merge). The `windows` CI job hasn't finished on this head, so this fills that gap. **Setup:** Windows 11, WinLibs GCC 15.2 (`x86_64-ucrt-posix-seh`), Release, full build with `BUILD_TESTING=ON`. - **Build:** all 8,462 targets build, with no warnings in the files this PR changes. That includes the moved `numpunct<char>` bodies in `LocaleSupport.cpp` and `Numpunct.cpp` and the new declarations in `GuestLocale.hpp`. - **Tests:** your focused set as it's registered on Windows. That is 38 tests, each run once, and all pass: the directory, `opendir2`, `fdopendir`, POSIX-for-WebKit, AIO, Ampr, `wcsrtombs`, aligned `new`/`delete`, new-handler, `nid_patcher_symbol_versions`, `guest_libc_internal_numpunct` and locale tests. `patched_self_imports` is registered only on Linux, so it didn't run here. I ran no negative control: a Windows import is bound to the DLL it names, so the self-binding this fixes can't happen on PE. What this shows is that moving the bodies into `_nid_no_patch` functions changes nothing on Windows.
MarcZX10 commented 2026-11-12 01:58:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T01:58:46Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The updated head records the title references, but its checklist still does not record an author-agreed order for several open overlapping PRs, as CONTRIBUTING.md requires.

What I ran

Reviewed head a94a4be4aad794d770e388715b10787a333574c5 against current main 077a573cd1dab3d2fa2dbe6e508fa46118bce4cc. The merge preview is clean (tree 2fb47210038543b906143cb071091ba7a6e2e5f1). Environment: Linux x86-64, Python 3.11.2, GCC 12.2.0.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13730 --output-dir /tmp/pr-13730-precheck-latest
git merge-tree --write-tree --name-only --no-messages 077a573cd1dab3d2fa2dbe6e508fa46118bce4cc a94a4be4aad794d770e388715b10787a333574c5
gh pr checks 13730 --repo boykopovar/AnyPS5

I read the full 17-file diff and the current overlap/checklist discussion. The precheck pinned the same head and base before and after the run.

Results

Check Result Note
Diff and conventions passed Exact head and base.
Export audit passed Static audit reported heuristic warnings; it is not an ABI certificate.
Merge preview passed Clean on the current base.
Test registration passed Manually confirmed the Linux-only patched_self_imports CTest registration.
Build-dependent Linux test not run No exact-head libs build was made here.
Hosted CI incomplete Windows was pending; Linux was skipped.
Precheck table, commands and captured output

The precheck's exact table:

Check Status Why
build_and_compile not_run Builds are excluded from the fast no-build check.
diff_check passed git diff --check on the pinned base and head.
conventions_and_pr_template passed Repository conventions passed.
changed_export_abi_audit passed Static audit completed with heuristic warnings.
python_syntax not_applicable No Python implementation files changed.
related_python_unit_tests not_applicable No related Python tool suite applies.
python_test_registration not_applicable No Python tests changed.
live_dependency_and_mergeability_check passed Stack check and current-base merge preview completed.
build_dependent_cpp_tests not_run Exact-head patched libraries were not built.
test_quality_heuristics passed Its possible-unregistered-test warning was checked against the CMake registration.
negative_controls not_applicable No eligible changed Python test module.

Captured command output:

/tmp/pr-13730-precheck-latest/report.md
/tmp/pr-13730-precheck-latest/report.json
Conclusion: checks incomplete
2fb47210038543b906143cb071091ba7a6e2e5f1

The CI snapshot from gh pr checks showed windows pending and linux skipping; the relinker, register-context, edge-watch, write-watch, conventions, eligibility, report, and library-portability jobs shown in that output passed.

Negative control

Assertion Change to code under test Result
A patched library must not import an NID that it also exports Revert the provider-body moves on this exact head Not run by me; the exact-head Linux patched-library test was not built.

The PR description reports a pass on the PR and a failure on an older main snapshot; I did not independently reproduce that control on this head and current base.

Findings

Blocking

The Depends on: none line is not sufficient for the four still-open overlaps listed in the PR description. Current heads still overlap this change: #18135 at LocaleSupport.cpp, #18659 at _execvpe in AdditionalExports.cpp, #18190 at the Aio.cpp write call, and #18122 at the forwarded libc exports. The #18190 author explicitly says the same AIO line is changed and that #13730 would be rebased if #18190 lands first; that is not an agreed landing order. CONTRIBUTING.md requires agreement with the affected authors and recording the order in Depends on.

Please agree with each affected author which PR lands first, then record the resulting dependency on this checklist. If an overlap no longer applies, update the overlap list with the current evidence.

Non-blocking

The earlier missing Unblocks references are now present for PPSA98513 and PPSA98512. The clean current-base merge preview means the branch does not need a rebase merely for being behind main.

Sources

Not verified

  • I did not build the exact head or run patched_self_imports; Linux CI is skipped, so it supplies no result for that test.
  • The Windows job was pending when checked.
  • The reported Linux test and title runs in the PR description were not independently rerun here.

To get this to a good state

Record the agreed order and Depends on line for the remaining live overlaps. I will rerun the same precheck and re-review the new head after that update; the hosted Windows check also needs to finish before approval can be considered.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5867847273 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730#pullrequestreview-5867847273). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T01:58:46Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The updated head records the title references, but its checklist still does not record an author-agreed order for several open overlapping PRs, as `CONTRIBUTING.md` requires. ## What I ran Reviewed head `a94a4be4aad794d770e388715b10787a333574c5` against current `main` `077a573cd1dab3d2fa2dbe6e508fa46118bce4cc`. The merge preview is clean (tree `2fb47210038543b906143cb071091ba7a6e2e5f1`). Environment: Linux x86-64, Python 3.11.2, GCC 12.2.0. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13730 --output-dir /tmp/pr-13730-precheck-latest git merge-tree --write-tree --name-only --no-messages 077a573cd1dab3d2fa2dbe6e508fa46118bce4cc a94a4be4aad794d770e388715b10787a333574c5 gh pr checks 13730 --repo boykopovar/AnyPS5 ``` I read the full 17-file diff and the current overlap/checklist discussion. The precheck pinned the same head and base before and after the run. ## Results | Check | Result | Note | |---|---|---| | Diff and conventions | passed | Exact head and base. | | Export audit | passed | Static audit reported heuristic warnings; it is not an ABI certificate. | | Merge preview | passed | Clean on the current base. | | Test registration | passed | Manually confirmed the Linux-only `patched_self_imports` CTest registration. | | Build-dependent Linux test | not run | No exact-head `libs` build was made here. | | Hosted CI | incomplete | Windows was pending; Linux was skipped. | <details> <summary>Precheck table, commands and captured output</summary> The precheck's exact table: | Check | Status | Why | |---|---|---| | build_and_compile | not_run | Builds are excluded from the fast no-build check. | | diff_check | passed | `git diff --check` on the pinned base and head. | | conventions_and_pr_template | passed | Repository conventions passed. | | changed_export_abi_audit | passed | Static audit completed with heuristic warnings. | | python_syntax | not_applicable | No Python implementation files changed. | | related_python_unit_tests | not_applicable | No related Python tool suite applies. | | python_test_registration | not_applicable | No Python tests changed. | | live_dependency_and_mergeability_check | passed | Stack check and current-base merge preview completed. | | build_dependent_cpp_tests | not_run | Exact-head patched libraries were not built. | | test_quality_heuristics | passed | Its possible-unregistered-test warning was checked against the CMake registration. | | negative_controls | not_applicable | No eligible changed Python test module. | Captured command output: ```text /tmp/pr-13730-precheck-latest/report.md /tmp/pr-13730-precheck-latest/report.json Conclusion: checks incomplete 2fb47210038543b906143cb071091ba7a6e2e5f1 ``` The CI snapshot from `gh pr checks` showed `windows pending` and `linux skipping`; the relinker, register-context, edge-watch, write-watch, conventions, eligibility, report, and library-portability jobs shown in that output passed. </details> ## Negative control | Assertion | Change to code under test | Result | |---|---|---| | A patched library must not import an NID that it also exports | Revert the provider-body moves on this exact head | Not run by me; the exact-head Linux patched-library test was not built. | The PR description reports a pass on the PR and a failure on an older `main` snapshot; I did not independently reproduce that control on this head and current base. ## Findings ### Blocking The `Depends on: none` line is not sufficient for the four still-open overlaps listed in the PR description. Current heads still overlap this change: #18135 at `LocaleSupport.cpp`, #18659 at `_execvpe` in `AdditionalExports.cpp`, #18190 at the `Aio.cpp` write call, and #18122 at the forwarded libc exports. The #18190 author explicitly says the same AIO line is changed and that #13730 would be rebased if #18190 lands first; that is not an agreed landing order. `CONTRIBUTING.md` requires agreement with the affected authors and recording the order in `Depends on`. Please agree with each affected author which PR lands first, then record the resulting dependency on this checklist. If an overlap no longer applies, update the overlap list with the current evidence. ### Non-blocking The earlier missing `Unblocks` references are now present for PPSA98513 and PPSA98512. The clean current-base merge preview means the branch does not need a rebase merely for being behind `main`. ## Sources - [Overlap and dependency rule, pinned to base `077a573c`](https://github.com/boykopovar/AnyPS5/blob/077a573cd1dab3d2fa2dbe6e508fa46118bce4cc/CONTRIBUTING.md#L71) - [This head's AIO forwarding call](https://github.com/boykopovar/AnyPS5/blob/a94a4be4aad794d770e388715b10787a333574c5/core/libs/prx/libkernel_sys/Aio.cpp) - [#18135 current head's locale changes](https://github.com/boykopovar/AnyPS5/blob/e36012df661dd7268b2d3f93dd5356589a29b5f4/core/libs/prx/libc/src/LocaleSupport.cpp) - [#18659 current head's `_execvpe` changes](https://github.com/boykopovar/AnyPS5/blob/b135a386b01f08e47c2b88a1238beb788ef7c2d7/core/libs/prx/libkernel_sys/AdditionalExports.cpp) - [#18190 author's overlap note](https://github.com/boykopovar/AnyPS5/pull/18190#issuecomment-6798023358) - [#18122 author's provider-layer discussion](https://github.com/boykopovar/AnyPS5/pull/18122#issuecomment-6798022785) ## Not verified - I did not build the exact head or run `patched_self_imports`; Linux CI is skipped, so it supplies no result for that test. - The Windows job was pending when checked. - The reported Linux test and title runs in the PR description were not independently rerun here. ## To get this to a good state Record the agreed order and `Depends on` line for the remaining live overlaps. I will rerun the same precheck and re-review the new head after that update; the hosted Windows check also needs to finish before approval can be considered.
MarcZX10 commented 2026-11-12 19:46:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T19:46:27Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head 378d91827e8fbe79b2560cd4703762d54a953d9e, base main. No merge preview.
  • Read the diff hunks of all 20 files in files.json under reviewed; none were excluded. Full text was not read for any file.
  • Nothing was built or tested here. Read-only lookups with the repository reader:
python3 repo_read.py search PosixPwrite_nid_no_patch
python3 repo_read.py search GuestDup2_nid_no_patch
python3 repo_read.py search GuestExecve_nid_no_patch
python3 repo_read.py search GuestExecvpe_nid_no_patch
python3 repo_read.py search StrokerExport_nid_no_patch
python3 repo_read.py search AlignedArrayNewNothrow_nid_no_patch
python3 repo_read.py search pwrite_nid_disambig1_nid_postfix
python3 repo_read.py search "define APS5_EXPORT"
python3 repo_read.py cat core/libs/prx/libSceFreeType/src/Stroker.cpp 1 20
python3 repo_read.py cat core/libs/prx/libSceFreeType/include/Api.hpp 1 20
python3 repo_read.py cat core/libs/prx/libkernel_web/Export.cpp 1 12
python3 repo_read.py cat core/libs/prx/libSceLibcInternal/AlignedNew.cpp 1 6
python3 repo_read.py cat core/libs/prx/libSceLibcInternal/Numpunct.cpp 1 8
python3 repo_read.py cat core/libs/prx/libSceAmpr/Export.cpp 1 12
python3 repo_read.py cat core/libs/prx/libScePosixForWebKit/Export.cpp 1 12
python3 repo_read.py cat core/libs/prx/libSceFreeTypeOt/Export.cpp 1 14
python3 repo_read.py cat core/libs/prx/libc/include/General.hpp 1 14
python3 repo_read.py cat core/libs/prx/libkernel/File/include/File.hpp 20 34
python3 repo_read.py cat core/libs/prx/libkernel_sys/AdditionalExports.cpp 224 236
python3 repo_read.py cat core/libs/CMakeLists.txt 486 500

Results

Check Result Note
Changed hunks, 20 files passed every hunk read
New helper names and includes passed each call has a declaration in an included header
AIO write target passed same helper as libkernel's pwrite
Build not run no build in this review
Tests, including patched_self_imports not run author-reported only

Findings

Blocking

None.

Non-blocking

None found in the code read.

Sources

Not verified

  • Cross-library linkage: GuestDup2_nid_no_patch, GuestExecve_nid_no_patch, GuestExecvpe_nid_no_patch, StrokerExport_nid_no_patch and the libc helpers (NumpunctDo…_nid_no_patch, AlignedArrayNewNothrow_nid_no_patch, OpenDirectory_nid_no_patch and others) are called from other libraries without APS5_EXPORT. Whether they are dynamic symbols depends on the build's symbol visibility, which I did not check.
  • The hang fix on Apotris, FFTARecomp, DevilutionX, Source Port and I Wanna Be The Guy: author-reported only. The description's runs name earlier heads (fe58f461d6, e9e816f6c7, 4a590b5085), not 378d91827e8f.
  • "No patched library imports a name it exports (411 libraries)": author-reported. I did not run patched_self_imports.
  • The rest of each changed file was not read; only hunks and the lookups above.

To get this to a good state

Nothing is required.

Optional: name the head that the test table was run on. It lists three earlier heads, so the table does not show a run on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5880994065 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730#pullrequestreview-5880994065). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T19:46:27Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head `378d91827e8fbe79b2560cd4703762d54a953d9e`, base `main`. No merge preview. - Read the diff hunks of all 20 files in `files.json` under `reviewed`; none were excluded. Full text was not read for any file. - Nothing was built or tested here. Read-only lookups with the repository reader: ``` python3 repo_read.py search PosixPwrite_nid_no_patch python3 repo_read.py search GuestDup2_nid_no_patch python3 repo_read.py search GuestExecve_nid_no_patch python3 repo_read.py search GuestExecvpe_nid_no_patch python3 repo_read.py search StrokerExport_nid_no_patch python3 repo_read.py search AlignedArrayNewNothrow_nid_no_patch python3 repo_read.py search pwrite_nid_disambig1_nid_postfix python3 repo_read.py search "define APS5_EXPORT" python3 repo_read.py cat core/libs/prx/libSceFreeType/src/Stroker.cpp 1 20 python3 repo_read.py cat core/libs/prx/libSceFreeType/include/Api.hpp 1 20 python3 repo_read.py cat core/libs/prx/libkernel_web/Export.cpp 1 12 python3 repo_read.py cat core/libs/prx/libSceLibcInternal/AlignedNew.cpp 1 6 python3 repo_read.py cat core/libs/prx/libSceLibcInternal/Numpunct.cpp 1 8 python3 repo_read.py cat core/libs/prx/libSceAmpr/Export.cpp 1 12 python3 repo_read.py cat core/libs/prx/libScePosixForWebKit/Export.cpp 1 12 python3 repo_read.py cat core/libs/prx/libSceFreeTypeOt/Export.cpp 1 14 python3 repo_read.py cat core/libs/prx/libc/include/General.hpp 1 14 python3 repo_read.py cat core/libs/prx/libkernel/File/include/File.hpp 20 34 python3 repo_read.py cat core/libs/prx/libkernel_sys/AdditionalExports.cpp 224 236 python3 repo_read.py cat core/libs/CMakeLists.txt 486 500 ``` ## Results | Check | Result | Note | |---|---|---| | Changed hunks, 20 files | passed | every hunk read | | New helper names and includes | passed | each call has a declaration in an included header | | AIO write target | passed | same helper as libkernel's pwrite | | Build | not run | no build in this review | | Tests, including `patched_self_imports` | not run | author-reported only | ## Findings **Blocking** None. **Non-blocking** None found in the code read. ## Sources - `core/libs/prx/libkernel_sys/Aio.cpp:115` now calls `PosixPwrite_nid_no_patch`. libkernel's `pwrite_nid_disambig1_nid_postfix` calls the same helper: https://github.com/boykopovar/AnyPS5/blob/378d91827e8fbe79b2560cd4703762d54a953d9e/core/libs/prx/libkernel/File/src/Stdio.cpp#L1286-L1287 ## Not verified - Cross-library linkage: `GuestDup2_nid_no_patch`, `GuestExecve_nid_no_patch`, `GuestExecvpe_nid_no_patch`, `StrokerExport_nid_no_patch` and the libc helpers (`NumpunctDo…_nid_no_patch`, `AlignedArrayNewNothrow_nid_no_patch`, `OpenDirectory_nid_no_patch` and others) are called from other libraries without `APS5_EXPORT`. Whether they are dynamic symbols depends on the build's symbol visibility, which I did not check. - The hang fix on Apotris, FFTARecomp, DevilutionX, Source Port and I Wanna Be The Guy: author-reported only. The description's runs name earlier heads (`fe58f461d6`, `e9e816f6c7`, `4a590b5085`), not `378d91827e8f`. - "No patched library imports a name it exports (411 libraries)": author-reported. I did not run `patched_self_imports`. - The rest of each changed file was not read; only hunks and the lookups above. ## To get this to a good state Nothing is required. Optional: name the head that the test table was run on. It lists three earlier heads, so the table does not show a run on this head.
MarcZX10 commented 2026-11-15 20:02:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T20:02:39Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the implementation and targeted test support the stated fix, while execution checks were not run during this review.

What I ran

No commands or tests were run. I reviewed head 6c5bee0282cee61ea578b2e75f93caefac0337b1 from the prepared diff and the repository reader; the author-reported checks in the PR description were not run by me.

Results

Check Result Note
Diff and changed lines passed All 21 changed files read
Targeted helper code passed Forwarding paths and signatures reviewed
Tests and build not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

No build, tests, or runtime behavior were independently verified. The PR description reports those results, but they are author-supplied. No files were excluded from review according to the prepared manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5912623073 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13730#pullrequestreview-5912623073). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T20:02:39Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the implementation and targeted test support the stated fix, while execution checks were not run during this review. ## What I ran No commands or tests were run. I reviewed head `6c5bee0282cee61ea578b2e75f93caefac0337b1` from the prepared diff and the repository reader; the author-reported checks in the PR description were not run by me. ## Results | Check | Result | Note | |---|---|---| | Diff and changed lines | passed | All 21 changed files read | | Targeted helper code | passed | Forwarding paths and signatures reviewed | | Tests and build | not run | Author-reported results only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No build, tests, or runtime behavior were independently verified. The PR description reports those results, but they are author-supplied. No files were excluded from review according to the prepared manifest. ## To get this to a good state Nothing is required.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!13730
No description provided.