feat(libc): add bad_function_call and sized aligned delete #1391
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1391"
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 authurtabo-byte on 2026-10-08T01:37:12Z.
What
Add two libc exports:
_ZNSt8__sce_v219_Xbad_function_callEvthrows the guest-compatiblestd::bad_function_call_ZdlPvmSt11align_val_t(sized aligned delete) frees like_ZdlPvmBoth satisfy
libSceLibcInternal.prximports through the hostlibc.prxfallback.Tested
Windows 11, Pure Pool Pro (PPSA28502). The title previously failed with
unresolved ELF importforg0mZgRTFPoQandnwujzxOPXzQfromlibSceLibcInternal.prx; with these exports the imports resolve and the title reaches the ELF entry point.guest_host_libcand the exception tests pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T02:47:54Z.
Review: COMMENTED
Built it, ran the tests, and verified the premise independently — this one is stronger than the diff suggests.
The two NIDs hash to exactly the two symbols you added. Running the project's own oracle on the NIDs from your body:
The NID is a hash of the name, so that is a check rather than a reading: the two imports PPSA28502 failed on are provably the two exports added here. That is the strongest form of evidence available for a libc export, and it is independent of your own claim about the title.
Linux (CachyOS, GCC, Release):
Both additions match the surrounding conventions exactly, which is what I checked next.
_ZTVSt17bad_function_call_nid_postfix, which already exists (StandardExceptions.cpp:170) — so it is wired to a real vtable rather than a dangling name, and it follows the file's[[noreturn]] … ThrowPlain(<vtable>)shape.StdioExtras.cppbeside its siblings and is the same body with the extra parameters ignored:Ignoring size and alignment is the right call here, because every member of this family frees through the one guest heap, so the aligned path cannot diverge from the plain one by accident.
One observation, not a request. The aligned new (
_ZnwmSt11align_val_t/_ZnamSt11align_val_t) is not exported anywhere in the tree, so a title that imports it will still stop withunresolved ELF import— the same shape this PR fixes. Nothing to do while no title needs it; worth knowing, since the natural next report of this kind will name it.What I could not verify: the title itself. PPSA28502 is a Windows run and I have no dump for it, so "the imports resolve and the title reaches the ELF entry point" is your measurement. The NID equivalence above is the part that stands on its own.
This is a comment, not an approval — I have no merge rights here.
Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T04:36:28Z.
Progress report (
df16c4c→1aa087d)📈 System libraries: 86.15% (+0.01%, +2 implemented functions)
✅ 2 implemented
_ZNSt8__sce_v219_Xbad_function_callEv_nid_postfix_ZdlPvmSt11align_val_t_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T12:44:13Z.
Closing as a duplicate: both exports (
_ZNSt8__sce_v219_Xbad_function_callEvand_ZdlPvmSt11align_val_t) already landed onmainin #1120, together with tests (ExceptionRuntime.cpp,ApplicationHeap.cpp). Rebasing this PR onmainleaves an empty diff.If PPSA28502 still stops on another unresolved import after updating to current
main, please open a new PR for that one. Thanks for the NID report.Pull request closed