feat(libSceLibcInternal): return from 52 empty facet members as firmware 13.42 does #15584

Closed
BunnyFl wants to merge 4 commits from upstream-pr/15584 into main
BunnyFl commented 2026-11-03 20:28:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-03T20:28:59Z.


What

52 libSceLibcInternal exports threw. In firmware 13.42 each one is a single ret. They are:

  • the complete-object (D1) and base-object (D2) destructors of the codecvt, collate, messages, money_get, money_put, num_get, num_put and time_put facets, and of std::bad_exception and std::type_info;
  • the _Init(const _Locinfo&) members of the codecvt<char>, messages, money_get, money_put, num_get and num_put facets;
  • the _Tidy() members of numpunct and time_get.

They now return without reading or writing anything. Names and NIDs match tools/nid_names.py.

  • The exports keep their helper names in core/libs/prx/libSceLibcInternal/InventoryExports.cpp (39) and InventoryExports6.cpp (13).
  • Destructors and _Tidy become void (void* self). _Init becomes void (void* self, const void* locinfo).
  • The 39 keep their single declaration in include/InventoryExports.hpp, changed to match. The 13 from InventoryExports6.cpp had none, and get one each in include/Api.hpp next to the other implemented _nid_no_patch helpers.
  • docs/dev/debt/libSceLibcInternal.md:
    • The 13 per-function "signature and behavior are unverified" entries for InventoryExports6.cpp are removed: their gaps are closed.
    • A new short entry, "Empty facet and exception members", names the 39 from InventoryExports.cpp and the 13.42 reading. The "Additional callable exports" entry now says every entry except those throws.

This PR doesn't touch the libc facet model in core/libs/prx/libc/src/LocaleSupport.cpp, whose _Getcat builds facets with its own host vtables.

Source

Firmware 13.42 system/common/lib/libSceLibcInternal.sprx (sha256 a01795ab49df639dd40abd6194956ada062244826824ce486c9acab227bf5285), read from disassembly, not run on a console. Each address below is the entry of the exports named beside it, and the whole body is the one instruction:

1c4d0: ret   ; _ZNSt13bad_exceptionD1Ev (t6egllDqQ2M), _ZNSt13bad_exceptionD2Ev (iWNC2tkDgxw)
34f10: ret   ; _ZNSt9type_infoD1Ev (LLssoYjMOow), _ZNSt9type_infoD2Ev (zb3436295XU)
98cf0: ret   ; _ZNSt7codecvtIcc9_MbstatetE5_InitERKSt8_Locinfo (iZCHNahj++4)
98e50: ret   ; _ZNSt7codecvtIcc9_MbstatetED2Ev (to7GggwECZU)
98e60: ret   ; _ZNSt7codecvtIcc9_MbstatetED1Ev (djNkrJKTb6Q)
99270: ret   ; _ZNSt7collateIcED2Ev (dP5zwQ2Yc8g)
99280: ret   ; _ZNSt7collateIcED1Ev (8pXCeme0FC4)
99a60: ret   ; _ZNSt8messagesIcE5_InitERKSt8_Locinfo (eLB2+1+mVvg)
99c10: ret   ; _ZNSt8messagesIcED2Ev (yDdbQr1oLOc)
99c20: ret   ; _ZNSt8messagesIcED1Ev (34mi8lteNTs)
9a430: ret   ; _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (6zg3ziZ4Qis)
9a530: ret   ; _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED2Ev (CClObiVHzDY)
9a540: ret   ; _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED1Ev (zkCx9c2QKBc)
9caa0: ret   ; _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (riBxNiKLvI0)
9cba0: ret   ; _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED2Ev (MuACiCSA8-s)
9cbb0: ret   ; _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED1Ev (AnE9WWbyWkM)
9e780: ret   ; _ZNSt8numpunctIcE5_TidyEv (fFnht9SPed8)
9eaf0: ret   ; _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED2Ev (6S8jzWWGcWo)
9eb00: ret   ; _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED1Ev (kAay0hfgDJs)
9eb20: ret   ; _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (cXL+LN0lSwc)
a3dc0: ret   ; _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED2Ev (U4JP-R+-70c)
a3dd0: ret   ; _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED1Ev (WoCt9o2SYHw)
a3df0: ret   ; _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (BbJ4naWZeRw)
a6e60: ret   ; _ZNSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE5_TidyEv (+yrOX7MgVlk)
a9a00: ret   ; _ZNSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED2Ev (vu0B+BGlol4)
a9a10: ret   ; _ZNSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED1Ev (h+c9OSfCAEg)
a9f90: ret   ; _ZNSt7collateIwED2Ev (84wIPnwBGiU)
a9fa0: ret   ; _ZNSt7collateIwED1Ev (ZO3a6HfALTQ)
aa870: ret   ; _ZNSt8messagesIwE5_InitERKSt8_Locinfo (Zz-RfDtowlo)
aaa20: ret   ; _ZNSt8messagesIwED2Ev (I-e7Dxo087A)
aaa30: ret   ; _ZNSt8messagesIwED1Ev (6sAaleB7Zgk)
ab280: ret   ; _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (JOj6qfc4VLs)
ab380: ret   ; _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED2Ev (7ZmeGHyM6ew)
ab390: ret   ; _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED1Ev (a6yvHMSqsV0)
ada30: ret   ; _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (kJmdxo4uM+8)
adb30: ret   ; _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev (4+oswXtp7PQ)
adb40: ret   ; _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev (hnGhTkIDFHg)
afb10: ret   ; _ZNSt8numpunctIwE5_TidyEv (2YCDWkuFEy8)
afe40: ret   ; _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED2Ev (bwVJf3kat9c)
afe50: ret   ; _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED1Ev (Zbaaq-d70ms)
afe70: ret   ; _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (4MHgRGOKOXY)
b5590: ret   ; _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev (6hV3y21d59k)
b55a0: ret   ; _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev (WiUy3dEtCOQ)
b55c0: ret   ; _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (V2FICbvPa+s)
b8550: ret   ; _ZNSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE5_TidyEv (ImblNB7fVVU)
bb680: ret   ; _ZNSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev (8PJ9qmklj2c)
bb690: ret   ; _ZNSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev (CiD6-BPDZrA)
bfff0: ret   ; _ZNSt7codecvtIwc9_MbstatetED1Ev (0fkFA3za2N8)
c04e0: ret   ; _ZNSt7codecvtIDsc9_MbstatetED1Ev (Oeo9tUbzW7s)
c0b70: ret   ; _ZNSt7codecvtIDic9_MbstatetED1Ev (TuhGCIxgLvA)

No argument is read, this included, and nothing is written; the ret only returns to the caller. A null or invalid pointer is never dereferenced, here or in firmware.

Tested

  • Windows 11, WinLibs GCC, Release, head 94d15e4116: 68 of 68 pass. That is:
    • the new guest_libc_internal_empty_facet_members;
    • guest_err and guest_libc_internal_exception_destructors, which link the same library;
    • public_headers and the 64 public_headers_compile_* batches.
  • New core/libs/tests/GuestLibcInternalEmptyFacetMembers.cpp (registered after guest_err_tests in core/libs/prx/libSceLibcInternal/CMakeLists.txt):
    • It calls all 52 on a 0x80-byte object filled with 0xa5. The _Init members also get a 0x80-byte _Locinfo stand-in filled with 0x5a.
    • It checks that both buffers are unchanged afterwards.
  • Negative control: I put NotImplemented_nid_no_patch(__func__) back at the top of the 52 bodies, which is main's behaviour, and kept this branch's signatures and test. The new test then aborts with libSceLibcInternalInventory_021_nid_no_patch not implemented (1 of 1 failed).
  • tools/check_conventions.py --base upstream/main on the committed head 94d15e4116: all checks pass.
    • Correction: the first head, be00f1bf72, had a debt-length warning (the additional exports entry reached 1364 characters). I had run the check before committing, and it reads committed Git objects (CONTRIBUTING.md, "reads pull request Git objects"), so it didn't see the debt change. The second commit moves the note into its own entry, which fixes it.
  • tools/pr_overlap.py --branch: #13486, #13778, #13782, #14212, #14401, #14664, #14796, #14836, #14837, #14903, #14936, #15582 and #5021 share files. None of their diffs names any of these helpers or NIDs.
    • My #15582 adds declarations after the same line of include/Api.hpp. Whichever merges second needs a one-line rebase.
  • Merged main 87448b3c91 into the branch; the head is now 99026d4f56. The only conflict was the docs/dev/debt/libSceLibcInternal.md inventory entry: main had rewritten it to exempt its two new showmanyc exports from the statement that every entry throws, so this merge takes main's wording and widens that exemption to cover this branch's empty facet and exception members as well, keeping main's separate showmanyc entry and this branch's "Empty facet and exception members" entry unchanged. Counted from the merged tree, InventoryExports.cpp holds 288 APS5_EXPORT entries, 41 of them non-throwing: this branch's 39 plus main's two showmanyc exports. InventoryExports6.cpp keeps this branch's 13, each with one declaration in include/Api.hpp.
    • An earlier merge of main 01f804bb2f gave the head 33f57566ee, where that entry recorded 288 observed entries with 282 matching the public 3.20 catalogue, against this branch's original 295 and 289.
  • On the merged head 99026d4f56, Windows 11, WinLibs GCC, Release: the same 68 of 68 pass, none skipped, and tools/check_conventions.py --base upstream/main passes on the committed head.
  • Merged main cdf371df68 into the branch; the head is now b85d7c5df4. main had implemented _ZNSt8ios_baseD1Ev (#14664), the pmr resources (#14903) and fflush (#14872) elsewhere and removed their placeholders and per-function debt entries from InventoryExports.cpp, InventoryExports6.cpp and docs/dev/debt/libSceLibcInternal.md. Some of those sat next to this branch's lines, so the merge conflicted in those two places and next to main's new guest_libc_internal_memory_resource registration in CMakeLists.txt. Both sides' removals are kept, and both test registrations. The branch's added and removed lines against main are the same as before the merge.
  • Merged main 9e47f0c3ac into the branch (aff0181145): main had registered guest_libc_internal_facet_queries and declared its Pending3/Pending4 members where this branch registers guest_libc_internal_empty_facet_members and declares its 13 members, in core/libs/prx/libSceLibcInternal/CMakeLists.txt and include/Api.hpp; both sides are kept. check_conventions.py warned that the "Additional callable exports" entry (docs/dev/debt/libSceLibcInternal.md:9) was 1017 characters, over its debt-length limit, so db42e4c5f8 drops its sentence "No other runtime functionality is implemented". The head is now db42e4c5f8. ctest -R '^guest_libc_internal': 21 of 21 passed; sig_users.py HEAD --build: the changed declarations are named only in this branch's files.
    • Counted from the merged tree: InventoryExports.cpp holds 282 APS5_EXPORT entries, 41 of them non-throwing (this branch's 39 and main's two showmanyc exports), and InventoryExports6.cpp 142, 13 of them non-throwing (this branch's 13).
    • On b85d7c5df4, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 68 of 68 pass, none Not Run, the same suite as above with every executable rebuilt.
    • tools/check_conventions.py --base upstream/main on the committed head b85d7c5df4: all checks pass.
    • The negative control was not repeated: the branch's own lines are unchanged.
  • Linux and macOS were not built or run. No title was run.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5144048543 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15584). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-03T20:28:59Z. --- ### What 52 libSceLibcInternal exports threw. In firmware 13.42 each one is a single `ret`. They are: - the complete-object (`D1`) and base-object (`D2`) destructors of the `codecvt`, `collate`, `messages`, `money_get`, `money_put`, `num_get`, `num_put` and `time_put` facets, and of `std::bad_exception` and `std::type_info`; - the `_Init(const _Locinfo&)` members of the `codecvt<char>`, `messages`, `money_get`, `money_put`, `num_get` and `num_put` facets; - the `_Tidy()` members of `numpunct` and `time_get`. They now return without reading or writing anything. Names and NIDs match `tools/nid_names.py`. - The exports keep their helper names in `core/libs/prx/libSceLibcInternal/InventoryExports.cpp` (39) and `InventoryExports6.cpp` (13). - Destructors and `_Tidy` become `void (void* self)`. `_Init` becomes `void (void* self, const void* locinfo)`. - The 39 keep their single declaration in `include/InventoryExports.hpp`, changed to match. The 13 from `InventoryExports6.cpp` had none, and get one each in `include/Api.hpp` next to the other implemented `_nid_no_patch` helpers. - `docs/dev/debt/libSceLibcInternal.md`: - The 13 per-function "signature and behavior are unverified" entries for `InventoryExports6.cpp` are removed: their gaps are closed. - A new short entry, "Empty facet and exception members", names the 39 from `InventoryExports.cpp` and the 13.42 reading. The "Additional callable exports" entry now says every entry except those throws. This PR doesn't touch the libc facet model in `core/libs/prx/libc/src/LocaleSupport.cpp`, whose `_Getcat` builds facets with its own host vtables. ### Source Firmware 13.42 `system/common/lib/libSceLibcInternal.sprx` (sha256 `a01795ab49df639dd40abd6194956ada062244826824ce486c9acab227bf5285`), read from disassembly, not run on a console. Each address below is the entry of the exports named beside it, and the whole body is the one instruction: ``` 1c4d0: ret ; _ZNSt13bad_exceptionD1Ev (t6egllDqQ2M), _ZNSt13bad_exceptionD2Ev (iWNC2tkDgxw) 34f10: ret ; _ZNSt9type_infoD1Ev (LLssoYjMOow), _ZNSt9type_infoD2Ev (zb3436295XU) 98cf0: ret ; _ZNSt7codecvtIcc9_MbstatetE5_InitERKSt8_Locinfo (iZCHNahj++4) 98e50: ret ; _ZNSt7codecvtIcc9_MbstatetED2Ev (to7GggwECZU) 98e60: ret ; _ZNSt7codecvtIcc9_MbstatetED1Ev (djNkrJKTb6Q) 99270: ret ; _ZNSt7collateIcED2Ev (dP5zwQ2Yc8g) 99280: ret ; _ZNSt7collateIcED1Ev (8pXCeme0FC4) 99a60: ret ; _ZNSt8messagesIcE5_InitERKSt8_Locinfo (eLB2+1+mVvg) 99c10: ret ; _ZNSt8messagesIcED2Ev (yDdbQr1oLOc) 99c20: ret ; _ZNSt8messagesIcED1Ev (34mi8lteNTs) 9a430: ret ; _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (6zg3ziZ4Qis) 9a530: ret ; _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED2Ev (CClObiVHzDY) 9a540: ret ; _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED1Ev (zkCx9c2QKBc) 9caa0: ret ; _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (riBxNiKLvI0) 9cba0: ret ; _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED2Ev (MuACiCSA8-s) 9cbb0: ret ; _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED1Ev (AnE9WWbyWkM) 9e780: ret ; _ZNSt8numpunctIcE5_TidyEv (fFnht9SPed8) 9eaf0: ret ; _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED2Ev (6S8jzWWGcWo) 9eb00: ret ; _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEED1Ev (kAay0hfgDJs) 9eb20: ret ; _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (cXL+LN0lSwc) a3dc0: ret ; _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED2Ev (U4JP-R+-70c) a3dd0: ret ; _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED1Ev (WoCt9o2SYHw) a3df0: ret ; _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE5_InitERKSt8_Locinfo (BbJ4naWZeRw) a6e60: ret ; _ZNSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE5_TidyEv (+yrOX7MgVlk) a9a00: ret ; _ZNSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED2Ev (vu0B+BGlol4) a9a10: ret ; _ZNSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED1Ev (h+c9OSfCAEg) a9f90: ret ; _ZNSt7collateIwED2Ev (84wIPnwBGiU) a9fa0: ret ; _ZNSt7collateIwED1Ev (ZO3a6HfALTQ) aa870: ret ; _ZNSt8messagesIwE5_InitERKSt8_Locinfo (Zz-RfDtowlo) aaa20: ret ; _ZNSt8messagesIwED2Ev (I-e7Dxo087A) aaa30: ret ; _ZNSt8messagesIwED1Ev (6sAaleB7Zgk) ab280: ret ; _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (JOj6qfc4VLs) ab380: ret ; _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED2Ev (7ZmeGHyM6ew) ab390: ret ; _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED1Ev (a6yvHMSqsV0) ada30: ret ; _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (kJmdxo4uM+8) adb30: ret ; _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev (4+oswXtp7PQ) adb40: ret ; _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev (hnGhTkIDFHg) afb10: ret ; _ZNSt8numpunctIwE5_TidyEv (2YCDWkuFEy8) afe40: ret ; _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED2Ev (bwVJf3kat9c) afe50: ret ; _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEED1Ev (Zbaaq-d70ms) afe70: ret ; _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (4MHgRGOKOXY) b5590: ret ; _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev (6hV3y21d59k) b55a0: ret ; _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev (WiUy3dEtCOQ) b55c0: ret ; _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo (V2FICbvPa+s) b8550: ret ; _ZNSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE5_TidyEv (ImblNB7fVVU) bb680: ret ; _ZNSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev (8PJ9qmklj2c) bb690: ret ; _ZNSt8time_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev (CiD6-BPDZrA) bfff0: ret ; _ZNSt7codecvtIwc9_MbstatetED1Ev (0fkFA3za2N8) c04e0: ret ; _ZNSt7codecvtIDsc9_MbstatetED1Ev (Oeo9tUbzW7s) c0b70: ret ; _ZNSt7codecvtIDic9_MbstatetED1Ev (TuhGCIxgLvA) ``` No argument is read, `this` included, and nothing is written; the `ret` only returns to the caller. A null or invalid pointer is never dereferenced, here or in firmware. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - Windows 11, WinLibs GCC, Release, head `94d15e4116`: 68 of 68 pass. That is: - the new `guest_libc_internal_empty_facet_members`; - `guest_err` and `guest_libc_internal_exception_destructors`, which link the same library; - `public_headers` and the 64 `public_headers_compile_*` batches. - New `core/libs/tests/GuestLibcInternalEmptyFacetMembers.cpp` (registered after `guest_err_tests` in `core/libs/prx/libSceLibcInternal/CMakeLists.txt`): - It calls all 52 on a 0x80-byte object filled with 0xa5. The `_Init` members also get a 0x80-byte `_Locinfo` stand-in filled with 0x5a. - It checks that both buffers are unchanged afterwards. - **Negative control:** I put `NotImplemented_nid_no_patch(__func__)` back at the top of the 52 bodies, which is `main`'s behaviour, and kept this branch's signatures and test. The new test then aborts with `libSceLibcInternalInventory_021_nid_no_patch not implemented` (1 of 1 failed). - `tools/check_conventions.py --base upstream/main` on the committed head `94d15e4116`: all checks pass. - Correction: the first head, `be00f1bf72`, had a `debt-length` warning (the additional exports entry reached 1364 characters). I had run the check before committing, and it reads committed Git objects (`CONTRIBUTING.md`, "reads pull request Git objects"), so it didn't see the debt change. The second commit moves the note into its own entry, which fixes it. - `tools/pr_overlap.py --branch`: #13486, #13778, #13782, #14212, #14401, #14664, #14796, #14836, #14837, #14903, #14936, #15582 and #5021 share files. None of their diffs names any of these helpers or NIDs. - My #15582 adds declarations after the same line of `include/Api.hpp`. Whichever merges second needs a one-line rebase. - Merged `main` `87448b3c91` into the branch; the head is now `99026d4f56`. The only conflict was the `docs/dev/debt/libSceLibcInternal.md` inventory entry: `main` had rewritten it to exempt its two new `showmanyc` exports from the statement that every entry throws, so this merge takes `main`'s wording and widens that exemption to cover this branch's empty facet and exception members as well, keeping `main`'s separate `showmanyc` entry and this branch's "Empty facet and exception members" entry unchanged. Counted from the merged tree, `InventoryExports.cpp` holds 288 `APS5_EXPORT` entries, 41 of them non-throwing: this branch's 39 plus `main`'s two `showmanyc` exports. `InventoryExports6.cpp` keeps this branch's 13, each with one declaration in `include/Api.hpp`. - An earlier merge of `main` `01f804bb2f` gave the head `33f57566ee`, where that entry recorded 288 observed entries with 282 matching the public 3.20 catalogue, against this branch's original 295 and 289. - On the merged head `99026d4f56`, Windows 11, WinLibs GCC, Release: the same 68 of 68 pass, none skipped, and `tools/check_conventions.py --base upstream/main` passes on the committed head. - Merged `main` `cdf371df68` into the branch; the head is now `b85d7c5df4`. `main` had implemented `_ZNSt8ios_baseD1Ev` (#14664), the `pmr` resources (#14903) and `fflush` (#14872) elsewhere and removed their placeholders and per-function debt entries from `InventoryExports.cpp`, `InventoryExports6.cpp` and `docs/dev/debt/libSceLibcInternal.md`. Some of those sat next to this branch's lines, so the merge conflicted in those two places and next to `main`'s new `guest_libc_internal_memory_resource` registration in `CMakeLists.txt`. Both sides' removals are kept, and both test registrations. The branch's added and removed lines against `main` are the same as before the merge. - Merged `main` `9e47f0c3ac` into the branch (`aff0181145`): `main` had registered `guest_libc_internal_facet_queries` and declared its `Pending3`/`Pending4` members where this branch registers `guest_libc_internal_empty_facet_members` and declares its 13 members, in `core/libs/prx/libSceLibcInternal/CMakeLists.txt` and `include/Api.hpp`; both sides are kept. `check_conventions.py` warned that the "Additional callable exports" entry (`docs/dev/debt/libSceLibcInternal.md:9`) was 1017 characters, over its debt-length limit, so `db42e4c5f8` drops its sentence "No other runtime functionality is implemented". The head is now `db42e4c5f8`. `ctest -R '^guest_libc_internal'`: 21 of 21 passed; `sig_users.py HEAD --build`: the changed declarations are named only in this branch's files. - Counted from the merged tree: `InventoryExports.cpp` holds 282 `APS5_EXPORT` entries, 41 of them non-throwing (this branch's 39 and `main`'s two `showmanyc` exports), and `InventoryExports6.cpp` 142, 13 of them non-throwing (this branch's 13). - On `b85d7c5df4`, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: **68 of 68 pass, none Not Run**, the same suite as above with every executable rebuilt. - `tools/check_conventions.py --base upstream/main` on the committed head `b85d7c5df4`: all checks pass. - The negative control was not repeated: the branch's own lines are unchanged. - Linux and macOS were not built or run. No title was run. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

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!15584
No description provided.