refactor(prx): name the libSceLibcInternal export aliases the NID databases resolve #17300
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17300"
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 dkdhanda8 on 2026-11-08T17:27:34Z.
What
425 of
libSceLibcInternal's placeholder export aliases resolve in the pinned public symbol databases and are renamed after their resolved symbols, following the merged AudioIn/Json/CommonDialog naming series — acrossInventoryExports.cpp(271),Export.cpp(27),Err.cpp(30),InventoryExports6.cpp(57),TypeInfoDestructors.cpp(30) and eleven more files. These are mostly Dinkumware and Itanium-ABI internals (__cxxabiv1/__cxxabiv2destructors,_Mpunctfacet methods, aligned new/delete forms).Each placeholder's explicit
APS5_EXPORTcomes off and the bare resolved name hashes to the same NID; declarations ininclude/Api.hppand the guest tests that call the placeholders follow the renames. Every resolved name was verified by reproducing its NID withtools/nid_names.py'scompute_nidand matching it against aerolib.csv and the ps5rs catalog.Excluded on purpose: 197 aliases whose exports are currently touched by other open PRs; three
__atomic_*names that would shadow GCC built-ins; twelve whose resolved name already exists in the library under another NID; andstd::locale::~locale(), which keeps its inventory alias because binding it by name changes which export guest-test symbols resolve to (five guest tests abort on it in the full Windows run); 28 further NIDs covered by #15830, #17668 and #17765 keep their placeholders so the implementations can take them. No behavior changes; every stub still throws throughNotImplemented_nid_no_patch, and the debt entry records the renames.Tested
tools/check_conventions.py --base origin/mainpasses;git diff --checkis clean.-fsyntax-only(MinGW g++ 15); this environment cannot link standalone throw-using objects or build the full CMake tree, so test/CI execution is deferred to the project's rig.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); no silent stubs added.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-08T18:37:31Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
6bc7566581:tools/check_conventions.pypassed;git diff --checkclean.guest_libc_internal_collate_tests,guest_libc_internal_empty_facet_members_tests,guest_libc_internal_exception_destructors_tests,guest_libc_internal_facet_queries_tests,guest_libc_internal_ios_base_tests,guest_libc_internal_memory_resource_tests,guest_libc_internal_multi_precision_tests,guest_libc_internal_pad_tests,guest_libc_internal_placement_delete_tests,guest_libc_internal_runtime_hooks_tests,guest_libc_internal_showmanyc_tests,guest_libc_internal_type_info_destructors_testsbuilt cleanly.guest_libc_internal_pad,guest_libc_internal_showmanyc,guest_libc_internal_placement_delete,guest_libc_internal_type_info_destructors,guest_libc_internal_exception_destructors,guest_libc_internal_ios_base,guest_libc_internal_collate,guest_libc_internal_memory_resource,guest_libc_internal_runtime_hooks,guest_libc_internal_empty_facet_members,guest_libc_internal_facet_queries,guest_libc_internal_multi_precision):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-12T20:30:55Z.
Review: CHANGES_REQUESTED
This conflicts with
mainagain and I could not resolve it mechanically: rebasing onto1d0b2c771aconflicts inErr.cpp,Export.cpp,InventoryExports.cpp(7 hunks),InventoryExports2.cpp,InventoryExports6.cpp(8 hunks),include/Api.hpp,include/InventoryExports.hppanddocs/dev/debt/libSceLibcInternal.md. The auto/name series keeps renaming the same exports, so each hunk needs a decision on which name wins.mainand re-check which of the 425 aliases are already renamed there, keeping the 28 NIDs left to the implementation PRs as placeholders.Api.hppdeclarations and the guest tests still match the renamed providers (the_ZNSt4_PadD1Evmismatch from the last Windows run was this class of problem).The renames themselves look fine (Dean checked the names against the host C library); once it merges cleanly and the Linux build is green it can go in.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T16:12:16Z.
Review: COMMENTED
Reviewed — comments
The PR renames resolved
libSceLibcInternalexport aliases while preserving the implementations and updating declarations and guest-test call sites; I found one ABI-signature discrepancy that should be verified before treating the names as accurate.What I ran
Reviewed head
5be75a9da84da94cc75c43ef28105f791163a45cusing the prepared diff and the pinned repository reader. No tests or builds were run. The author reports convention checks and syntax-only compilation; these were not run as part of this review.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceLibcInternal/InventoryExports.cpp:202renames the_Iostream_error_categorydestructor to_ZNSt24_Iostream_error_categoryD1Ev, but declares it as returningint. An ItaniumD1destructor hasvoidreturn type, and neighboring destructor renames usevoidwhere their signatures are spelled out. Please confirm this entry's ABI signature and correct the declaration/definition if needed. This rename also affects the declaration incore/libs/prx/libSceLibcInternal/include/InventoryExports.hppand the changed export list.Not verified
files.jsonwas unavailable through the reader, so the prepared folder's excluded-file list was not verified. The reader's file listing showed 29 changed repository files, all included.To get this to a good state
Nothing is required. Optionally verify the
_Iostream_error_categorydestructor signature and update its declaration if necessary.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T16:58:24Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
c1e785a74b:tools/check_conventions.pypassed.guest_codecvt_utf_facets_tests,guest_libc_internal_aligned_new_tests,guest_libc_internal_collate_tests,guest_libc_internal_deleting_destructors_tests,guest_libc_internal_empty_facet_members_tests,guest_libc_internal_exception_destructors_tests,guest_libc_internal_exception_report_tests,guest_libc_internal_facet_queries_tests,guest_libc_internal_ios_base_tests,guest_libc_internal_memory_resource_tests,guest_libc_internal_messages_tests,guest_libc_internal_multi_precision_tests,guest_libc_internal_numpunct_tests,guest_libc_internal_pad_tests,guest_libc_internal_placement_delete_tests,guest_libc_internal_rng_abort_tests,guest_libc_internal_runtime_hooks_tests,guest_libc_internal_showmanyc_tests,guest_libc_internal_standard_stream_init_tests,guest_libc_internal_type_info_destructors_testsbuilt cleanly.guest_codecvt_utf_facets,guest_libc_internal_standard_stream_init,guest_libc_internal_rng_abort,guest_libc_internal_pad,guest_libc_internal_numpunct,guest_libc_internal_showmanyc,guest_libc_internal_aligned_new,guest_libc_internal_placement_delete,guest_libc_internal_type_info_destructors,guest_libc_internal_exception_destructors,guest_libc_internal_deleting_destructors,guest_libc_internal_ios_base,guest_libc_internal_collate,guest_libc_internal_memory_resource,guest_libc_internal_runtime_hooks,guest_libc_internal_empty_facet_members,guest_libc_internal_facet_queries,guest_libc_internal_messages,guest_libc_internal_multi_precision,guest_libc_internal_exception_report):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T17:12:57Z.
Review: COMMENTED
Reviewed — comments
The alias renames appear consistent in the inspected examples, but I did not read every changed line or verify every export mapping, so the evidence does not support approval.
What I ran
Reviewed head
c1e785a74bf1b4093fad2760ce27ddf36b1c5347using the prepared review documents and targeted repository reads. No build or tests were run.Results
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
The full changed-line set was not read.
review/README.mdlists 36 changed files and requires reading every added line; only selected ranges were inspected. The description’s claimed NID verification for all renamed exports and complete consistency of declarations and test callers therefore remain unverified.files.jsonwas unavailable through the reader; the file listing showed all listed changed files as included. No build, tests, CI, or console behavior was verified.To get this to a good state
Nothing is required. Optional: complete the changed-line review and run the project checks before relying on this review as approval evidence.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T17:25:36Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected diff shows export aliases renamed alongside their declarations and guest-test call sites; the review is incomplete because I did not read every changed file or run checks.
What I ran
Reviewed prepared artifacts at head
87a61fbdbdcd5e2172e41c6ba6984525e5ac073eusing the review reader. No build, test, or precheck command was run.Results
Negative control
Not run; no behavior test was executed.
Findings
Blocking
None identified in the inspected portions.
Non-blocking
None.
Sources
Reviewed
review/description.md,review/commits.md,review/manifest.json,review/diff.patch, and the changed-file listing. The inspected diff portions show alias name changes paired with updates to declarations and guest-test call sites.Not verified
The full diff and all 35 changed files were not reviewed at function level. No build, tests, NID recomputation, or convention check was run. Accordingly, alias-to-NID correctness and other behavior beyond the inspected diff portions are not verified.
To get this to a good state
Nothing is required. Optional: complete the changed-file review and run the project checks before treating this as a formal approval.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T17:31:11Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
87a61fbdbd:tools/check_conventions.pypassed.guest_codecvt_utf_facets_tests,guest_libc_internal_aligned_new_tests,guest_libc_internal_collate_tests,guest_libc_internal_deleting_destructors_tests,guest_libc_internal_empty_facet_members_tests,guest_libc_internal_exception_destructors_tests,guest_libc_internal_facet_queries_tests,guest_libc_internal_ios_base_tests,guest_libc_internal_memory_resource_tests,guest_libc_internal_messages_tests,guest_libc_internal_multi_precision_tests,guest_libc_internal_numpunct_tests,guest_libc_internal_pad_tests,guest_libc_internal_placement_delete_tests,guest_libc_internal_runtime_hooks_tests,guest_libc_internal_showmanyc_tests,guest_libc_internal_standard_stream_init_tests,guest_libc_internal_type_info_destructors_testsbuilt cleanly.guest_codecvt_utf_facets,guest_libc_internal_standard_stream_init,guest_libc_internal_pad,guest_libc_internal_numpunct,guest_libc_internal_showmanyc,guest_libc_internal_aligned_new,guest_libc_internal_placement_delete,guest_libc_internal_type_info_destructors,guest_libc_internal_exception_destructors,guest_libc_internal_deleting_destructors,guest_libc_internal_ios_base,guest_libc_internal_collate,guest_libc_internal_memory_resource,guest_libc_internal_runtime_hooks,guest_libc_internal_empty_facet_members,guest_libc_internal_facet_queries,guest_libc_internal_messages,guest_libc_internal_multi_precision):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T02:40:40Z.
Review: COMMENTED
Reviewed — no blocking findings
The targeted review of head
fb1e5f4249a445e8a5c898d5c11161b3950e6a0ffound no verified blocking defect, but the broad rename set was not fully inspected, so a formal approval is not justified.What I ran
No build or test commands were run. I read the prepared description, commit list, manifest, and portions of the diff; used the repository reader to inspect selected implementations and tests; and searched for selected renamed symbols. The author reports convention and syntax checks passed, but those checks were not run during this review.
Results
Negative control
Not run; this naming refactor has no new test assertion whose failure could serve as a negative control.
Findings
Blocking
None verified in the portions inspected.
Non-blocking
None.
Sources
Reviewed the prepared diff and selected files at the pinned head. No behavior claims beyond the inspected source are made.
Not verified
The review bundle lists 36 changed files. I directly read 7 changed source/header/test files:
AlignedNew.cpp,TypeInfoDestructors.cpp,include/Api.hpp,GuestLibcInternalEmptyFacetMembers.cpp,InventoryExports.cpp,InventoryExports6.cpp, andPlacementDelete.cpp. The other changed files were not read directly; the diff was only partially inspected. No build, test suite, convention check, or symbol database verification was run.To get this to a good state
Nothing is required. Optional: complete a review of the remaining changed files and run the project checks on this head.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T14:42:01Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
0888223068:tools/check_conventions.pypassed.guest_codecvt_utf_facets_tests,guest_libc_internal_aligned_new_tests,guest_libc_internal_collate_tests,guest_libc_internal_deleting_destructors_tests,guest_libc_internal_empty_facet_members_tests,guest_libc_internal_exception_destructors_tests,guest_libc_internal_facet_queries_tests,guest_libc_internal_ios_base_tests,guest_libc_internal_memory_resource_tests,guest_libc_internal_messages_tests,guest_libc_internal_multi_precision_tests,guest_libc_internal_numpunct_tests,guest_libc_internal_pad_tests,guest_libc_internal_placement_delete_tests,guest_libc_internal_runtime_hooks_tests,guest_libc_internal_showmanyc_tests,guest_libc_internal_standard_stream_init_tests,guest_libc_internal_type_info_destructors_testsbuilt cleanly.guest_codecvt_utf_facets,guest_libc_internal_standard_stream_init,guest_libc_internal_pad,guest_libc_internal_numpunct,guest_libc_internal_showmanyc,guest_libc_internal_aligned_new,guest_libc_internal_placement_delete,guest_libc_internal_type_info_destructors,guest_libc_internal_exception_destructors,guest_libc_internal_deleting_destructors,guest_libc_internal_ios_base,guest_libc_internal_collate,guest_libc_internal_memory_resource,guest_libc_internal_runtime_hooks,guest_libc_internal_empty_facet_members,guest_libc_internal_facet_queries,guest_libc_internal_messages,guest_libc_internal_multi_precision):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T08:46:53Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: restore NID export aliases for renamed functions whose candidate names have not been verified to hash to the existing NIDs.
What I ran
08882230685f82bb16fed9418128aaf4d053326c; base metadata saysmain.repo_read.py's reader tools. No commands or tests were run in this review; the description reports convention and syntax checks by the author.Results
Findings
Blocking
core/libs/prx/libSceLibcInternal/InventoryExports.cpp:1071— The rename removes theAPS5_EXPORTaliases for the five runtime hooks_init_tls,_malloc_finalize_lv2,_rtld_atfork_pre,_rtld_error,_rtld_get_stack_prot, and_sceLibcGetMallocParam(same issue at lines 1089 and nearby). These functions have no_nid_no_patchsuffix, so the project’sAPS5_EXPORTmechanism is what exposes the existing NID-based entry points. The description says names were hash-verified, but the changed source supplies no aliases and I could not confirm that each candidate name hashes to its original NID from the inspected files. Restore explicit aliases for any whose name-derived NID does not match, or provide and run a check proving the replacements preserve all existing NIDs.Non-blocking
Not verified
To get this to a good state
APS5_EXPORTaliases where needed. Then rerun the convention check and syntax compilation on the updated head.Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-22T14:23:30Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
da48b74d6f:tools/check_conventions.pypassed.guest_codecvt_utf_facets_tests,guest_libc_internal_aligned_new_tests,guest_libc_internal_collate_tests,guest_libc_internal_deleting_destructors_tests,guest_libc_internal_empty_facet_members_tests,guest_libc_internal_exception_destructors_tests,guest_libc_internal_facet_queries_tests,guest_libc_internal_ios_base_tests,guest_libc_internal_libc_forwards_tests,guest_libc_internal_memory_resource_tests,guest_libc_internal_messages_tests,guest_libc_internal_multi_precision_tests,guest_libc_internal_numpunct_tests,guest_libc_internal_pad_tests,guest_libc_internal_placement_delete_tests,guest_libc_internal_runtime_hooks_tests,guest_libc_internal_showmanyc_tests,guest_libc_internal_standard_stream_init_tests,guest_libc_internal_type_info_destructors_testsbuilt cleanly.guest_codecvt_utf_facets,guest_libc_internal_standard_stream_init,guest_libc_internal_pad,guest_libc_internal_numpunct,guest_libc_internal_showmanyc,guest_libc_internal_aligned_new,guest_libc_internal_placement_delete,guest_libc_internal_type_info_destructors,guest_libc_internal_exception_destructors,guest_libc_internal_deleting_destructors,guest_libc_internal_libc_forwards,guest_libc_internal_ios_base,guest_libc_internal_collate,guest_libc_internal_memory_resource,guest_libc_internal_runtime_hooks,guest_libc_internal_empty_facet_members,guest_libc_internal_facet_queries,guest_libc_internal_messages,guest_libc_internal_multi_precision):Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T14:33:51Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this review, but one renamed export needs its previous NID alias restored before its identity is clear.
What I ran
Reviewed head
da48b74d6f2c4238ccd7c1225018d5c63483d890against the prepared diff. No commands or tests were run.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceLibcInternal/Export.cpp:93renames the widemessages::openexport fromsceLibcInternalPending4_010_nid_no_patch, but removes itsAPS5_EXPORTalias without a replacement. The matching debt change record listsTPq0HfoACeIfor this symbol, while the new function has no export annotation in the reviewed source. Please confirm and preserve the intended NID mapping; otherwise callers resolving this export by NID may no longer find it.Not verified
To get this to a good state
Nothing is required. Please confirm the
messages<wchar_t>::openNID mapping as an optional follow-up.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T16:25:58Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: give the wide
money_put::_Initexport a distinct, correctly mangled name so it does not collide with the destructor export.What I ran
Reviewed head
7fd402cc7c23b007f3a351f186234ee8f734453a. Read the prepared description, commits, manifest, and complete diff; used the pinned reader to inspect affected export definitions and declarations. No tests or build commands were run.Results
Findings
Blocking
InventoryExports.cpp:878defines the wchar_tmoney_put::_Initimplementation with the same C-linkage name as the destructor defined atInventoryExports6.cpp:30. The same duplicate appears in the changed declarations (InventoryExports.hpp:190,Api.hpp:326). Because both are globalextern "C"exports, the translation units define the same linker symbol; the build cannot link both definitions, and the declaration also misidentifies_Initas the destructor. Use a distinct correct mangled_Initname and align its declaration and test reference.Non-blocking
None.
Not verified
To get this to a good state
Rename the wchar_t
money_put::_Initexport to its correct distinct symbol, update its declaration and guest-test references, then run the project’s build and relevant guest tests.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T17:40:09Z.
Review: COMMENTED
Reviewed — comments
The review is incomplete because I could not inspect all changed lines or run the checks needed to support a formal decision.
What I ran
Reviewed PR head
992b1fd84dee650698884d61a017c45e1f2e296cusing the prepared review artifacts andrepo_read.pyreader tools. No tests or build commands were run.Results
Api.hppwas readFindings
Blocking
None verified.
Non-blocking
None.
Not verified
I did not read every changed line or inspect all changed files. The prepared file list contains 35 changed files; only part of
core/libs/prx/libSceLibcInternal/include/Api.hppwas read as repository source. I could not verify the rename consistency, declarations, guest tests, or the author's reported checks. No tests, build, or precheck were run.To get this to a good state
Nothing is required. The review needs completion before a formal merge decision is justified.
Pull request closed