feat(libSceLibcInternal): implement the placement operator delete and delete[] #14837
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14837"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by miguelcoxcaballero on 2026-11-01T19:18:44Z.
What
Implements two
libSceLibcInternalexports that threwNotImplemented:1vo6qqqa9F4(_ZdlPvS_):operator delete(void*, void*)Suc8W0QPxjw(_ZdaPvS_):operator delete[](void*, void*)These are the placement forms, whose effect the C++ standard defines as "Intentionally performs no action" (new.delete.placement). Both are
noexceptand return without reading or freeing either pointer.libcdoes not export them. The two stubs, their declarations and their two table rows are removed, and a debt entry records what is unverified: the console'slibSceLibcInternal.sprxwas not read and no title was seen calling them.Tested
Ubuntu 24.04, GCC 13.3, Release,
BUILD_TESTING=ON, full build:tools/check_conventions.py --base origin/mainpasses.guest_libc_internal_placement_delete: on a recording application heap, both functions called with(block, block)and with(nullptr, block)release nothing and leave the 32 bytes of the block unchanged; the block is then freed once through_ZdlPv. It passes, together withguest_libc_internal_aligned_new,guest_libc_internal_mtx,guest_init_once,guest_localeandguest_libc_threads.libSceLibcInternal.prxexports each of the two NIDs once.libSceLibcInternalbranches (#14659, #14660, #14664, #14666) and the merged tree builds and passes their tests.Not tested on Windows, macOS or a PS5, nor with any title.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:24:56Z.
Review: COMMENTED
Reviewed — no blocking findings
I reviewed all seven changed files at head
5accbac52a3a3660d6e63946cf7f1c20ff9124bdand found no source-level blocker; approval is withheld while the hosted Windows job is pending.What I ran
The diff is against base
f2d874c1fdccf781c0fa5d86619bb5dd8894b958. Its merge preview against currentmain(e0caf1360035286bd22b9f2a3030e97b880ffb28) is clean. Environment: Linux x86_64, Debian 12, Python 3.11.2, Git 2.39.5. I did not build or compile.Results
mainUnedited command output
Negative control
Not run. I did not alter either implementation to test whether the new C++ test would fail under a deliberately incorrect freeing behavior.
Findings
Blocking
None found in the seven changed files.
Non-blocking
The PR reports the new test and full build passing on Ubuntu 24.04 with GCC 13.3; I did not independently rerun those checks. The current hosted Windows job is still pending, so this review does not approve the change yet.
Sources
Not verified
No local build, C++ test, Windows/macOS run, PS5 run or title compatibility test was performed. Hosted Windows remained pending; Linux and specialized jobs were skipped. The author-reported build and tests were read from the PR description only.
To get this to a good state
No source change is requested. Once the hosted Windows job completes, I will recheck the exact head and its required checks before deciding whether approval is appropriate.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T19:38:39Z.
Review: APPROVED
Re-checked — Windows CI passed, approved
The exact head is unchanged, its hosted Windows build and test job passed, and my earlier full source review found no blocker.
What I ran
Rechecked head
5accbac52a3a3660d6e63946cf7f1c20ff9124bdagainst basef2d874c1fdccf781c0fa5d86619bb5dd8894b958using GitHub’s live PR and check state. Environment: Debian 12 x86_64; no local build or compiler run.Results
Captured hosted-check output
Findings
Blocking
None found in the reviewed source.
Non-blocking
The author-reported Linux test results were not independently rerun here.
Sources
Not verified
I did not rerun a local C++ build, CTest, Linux/macOS tests, or console behavior. Linux and specialized hosted jobs were skipped.
To get this to a good state
No further action is needed for the reviewed head. If it changes, I will review the new head and its checks.