feat(libSceLibcInternal): implement remaining facet deleting destructors #25556

Merged
DIMPM32145 merged 1 commit from upstream-pr/25556 into main 2026-11-22 11:53:33 +00:00
DIMPM32145 commented 2026-11-22 08:52:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DIMPM32145 on 2026-11-22T08:52:02Z.


What

Implement the 5 remaining virtual deleting destructors (D0) for standard facets in libSceLibcInternal:

  • _ZNSt10moneypunctIwLb1EED0Ev_nid_postfix (NID fWuQSVGOivA)
  • _ZNSt7_MpunctIcED0Ev_nid_postfix (NID Lzj4ws7DlhQ)
  • _ZNSt7_MpunctIwED0Ev_nid_postfix (NID 8UeuxGKjQr8)
  • _ZNSt10moneypunctIcLb0EED0Ev_nid_postfix (NID sS5fF+fht2c)
  • _ZNSt10moneypunctIcLb1EED0Ev_nid_postfix (NID tcdvTUlPnL0)

In the Dinkumware C++ runtime, facet complete-object destructors have trivial bodies and delegating to _ZdlPv_nid_postfix(self) matches the existing implementations of _ZNSt7codecvtIwc9_MbstatetED0Ev_nid_postfix, _ZNSt8messagesIwED0Ev_nid_postfix, and _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED0Ev_nid_postfix.

Register all 5 in GuestLibcInternalDeletingDestructors.cpp and fold them out of technical debt via a fragment.

Tested

Windows 11, tools/check_conventions.py --base origin/main passed cleanly with 0 errors.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5437430690 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25556). Originally posted by [DIMPM32145](https://github.com/DIMPM32145) on 2026-11-22T08:52:02Z. --- ### What Implement the 5 remaining virtual deleting destructors (`D0`) for standard facets in `libSceLibcInternal`: - `_ZNSt10moneypunctIwLb1EED0Ev_nid_postfix` (NID `fWuQSVGOivA`) - `_ZNSt7_MpunctIcED0Ev_nid_postfix` (NID `Lzj4ws7DlhQ`) - `_ZNSt7_MpunctIwED0Ev_nid_postfix` (NID `8UeuxGKjQr8`) - `_ZNSt10moneypunctIcLb0EED0Ev_nid_postfix` (NID `sS5fF+fht2c`) - `_ZNSt10moneypunctIcLb1EED0Ev_nid_postfix` (NID `tcdvTUlPnL0`) In the Dinkumware C++ runtime, facet complete-object destructors have trivial bodies and delegating to `_ZdlPv_nid_postfix(self)` matches the existing implementations of `_ZNSt7codecvtIwc9_MbstatetED0Ev_nid_postfix`, `_ZNSt8messagesIwED0Ev_nid_postfix`, and `_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED0Ev_nid_postfix`. Register all 5 in `GuestLibcInternalDeletingDestructors.cpp` and fold them out of technical debt via a fragment. ### Tested Windows 11, `tools/check_conventions.py --base origin/main` passed cleanly with 0 errors. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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
PrivacyOnion commented 2026-11-22 08:55:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-22T08:55:30Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 894bbe63f7:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_libc_internal_deleting_destructors_tests built cleanly.
  • CTest (guest_libc_internal_deleting_destructors):
    1/1 Test #4538: guest_libc_internal_deleting_destructors ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/Export.cpp, core/libs/prx/libSceLibcInternal/InventoryExports6.cpp, core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp, core/libs/prx/libSceLibcInternal/include/PendingExports.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified in core/libs/prx/libSceLibcInternal/Export.cpp and InventoryExports6.cpp that all 5 deleting destructors (_ZNSt10moneypunctIcLb0EED0Ev_nid_postfix, _ZNSt10moneypunctIcLb1EED0Ev_nid_postfix, _ZNSt10moneypunctIwLb1EED0Ev_nid_postfix, _ZNSt7_MpunctIcED0Ev_nid_postfix, and _ZNSt7_MpunctIwED0Ev_nid_postfix) match the Itanium D0 calling signature (void return with void* self) and invoke _ZdlPv_nid_postfix(self).
    • Verified in core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp and PendingExports.hpp that all function declarations match their new definitions and calling conventions (APS5_VABI).
    • Verified in docs/dev/debt/changes/feat-libcinternal-facet-deleting-destructors.md that debt removal fragments adhere to AGENTS.md conventions for all 5 NID symbols under libSceLibcInternal.
    • Verified in core/libs/tests/GuestLibcInternalDeletingDestructors.cpp that all 5 deleting destructors are registered in the test matrix and properly exercised.
    • Verified that no disallowed comments, magic constants, or stray files were introduced into the repository.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6011390329 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25556#pullrequestreview-6011390329). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-22T08:55:30Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `894bbe63f7`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_libc_internal_deleting_destructors_tests` built cleanly. - **CTest** (`guest_libc_internal_deleting_destructors`): ``` 1/1 Test #4538: guest_libc_internal_deleting_destructors ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/Export.cpp`, `core/libs/prx/libSceLibcInternal/InventoryExports6.cpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp`, `core/libs/prx/libSceLibcInternal/include/PendingExports.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified in core/libs/prx/libSceLibcInternal/Export.cpp and InventoryExports6.cpp that all 5 deleting destructors (_ZNSt10moneypunctIcLb0EED0Ev_nid_postfix, _ZNSt10moneypunctIcLb1EED0Ev_nid_postfix, _ZNSt10moneypunctIwLb1EED0Ev_nid_postfix, _ZNSt7_MpunctIcED0Ev_nid_postfix, and _ZNSt7_MpunctIwED0Ev_nid_postfix) match the Itanium D0 calling signature (void return with void* self) and invoke _ZdlPv_nid_postfix(self). - Verified in core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp and PendingExports.hpp that all function declarations match their new definitions and calling conventions (APS5_VABI). - Verified in docs/dev/debt/changes/feat-libcinternal-facet-deleting-destructors.md that debt removal fragments adhere to AGENTS.md conventions for all 5 NID symbols under libSceLibcInternal. - Verified in core/libs/tests/GuestLibcInternalDeletingDestructors.cpp that all 5 deleting destructors are registered in the test matrix and properly exercised. - Verified that no disallowed comments, magic constants, or stray files were introduced into the repository. Looks Good To Me
MarcZX10 commented 2026-11-22 10:15:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T10:15:03Z.

Review: APPROVED


Reviewed — looks good

Nothing in the changed code blocks merging; all five deleting destructors forward the object pointer to the established deallocation function, and the test includes each new function.

What I ran

Reviewed head 894bbe63f7c37c8bbc482151783a7f2a2f6c0c0d using repo_read.py's prepared review bundle and pinned repository reader. No commands or tests were run.

Results

Check Result Note
Code review passed Changed files read
Tests not run No test execution
Author-reported convention check not run Description reports it passed

Findings

Blocking

None.

Non-blocking

None.

Not verified

No build, test, runtime, or physical-console behavior was verified. The files in files.json under reviewed were read: Export.cpp, InventoryExports6.cpp, InventoryExports6.hpp, PendingExports.hpp, GuestLibcInternalDeletingDestructors.cpp, and feat-libcinternal-facet-deleting-destructors.md. No changed files were excluded by the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6011650665 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/25556#pullrequestreview-6011650665). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T10:15:03Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the changed code blocks merging; all five deleting destructors forward the object pointer to the established deallocation function, and the test includes each new function. ## What I ran Reviewed head `894bbe63f7c37c8bbc482151783a7f2a2f6c0c0d` using `repo_read.py`'s prepared review bundle and pinned repository reader. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | Changed files read | | Tests | not run | No test execution | | Author-reported convention check | not run | Description reports it passed | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No build, test, runtime, or physical-console behavior was verified. The files in `files.json` under `reviewed` were read: `Export.cpp`, `InventoryExports6.cpp`, `InventoryExports6.hpp`, `PendingExports.hpp`, `GuestLibcInternalDeletingDestructors.cpp`, and `feat-libcinternal-facet-deleting-destructors.md`. No changed files were excluded by the 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!25556
No description provided.