feat(libSceLibcInternal): construct the wide money_get and money_put facets #24880
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24880"
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 0x70776c on 2026-11-21T08:51:45Z.
What
Implements four wide
money_get/money_putexports in MoneyGetPut.cpp, updates InventoryExports6.hpp and removes their stubs from InventoryExports6.cpp, and updates technical debt via feat-libcinternal-wide-money-facets.md:money_get<wchar_t>::money_get(size_t)(_ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEEC2Em, NIDx5yAFCJRz8I)money_get<wchar_t>::_Getcat(...)(_ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE7_GetcatEPPKNSt6locale5facetEPKS5_, NIDDTH1zTBrOO8)money_put<wchar_t>::money_put(const _Locinfo&, size_t)(_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC2ERKSt8_Locinfom, NIDaTjYlKCxPGo)money_put<wchar_t>::_Put(...)(_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE4_PutES3_St22_String_const_iteratorISt11_String_valISt13_Simple_typesIwEEEm, NID-hrHhi-UFxs)Both constructed facets install local vtables with real
destroy/delete/retain/releasereference-counting slots while forwardingdo_get/do_putvirtual slots to the existing throwing exports (sincemoneypunctis implemented in another open PR)._Putwrites 2-byte elements through the gueststreambufput area withoverflowfallback. Its static-member signature comes from Dinkumwarexlocmonand is not verified against console binaries (noted in the debt fragment).Tested
Fedora Linux 43 (
7.3.3-100.fc43.x86_64), GCC15.3.1, Release build (BUILD_TESTING=ON):overflow_Put, zero count, missing buffer, null source rejection,_Getcat, constructor null guards, andretain/release/deleteObjectlifecycle.ctest --test-dir build -R '^(guest_libc_internal_(money_get_put|deleting_destructors)|public_headers)$' -V: 3/3 passed.python3 tools/check_conventions.py --base origin/main: All conventions checks passed.python3 tools/debt_fold.py --check: passed.python3 tools/pr_overlap.py:open: noneon all 4 symbols.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T09:01:10Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
efdf28dbad:tools/check_conventions.pypassed.guest_libc_internal_money_get_put_testsbuilt cleanly.guest_libc_internal_money_get_put):core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/MoneyGetPut.cpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T09:01:22Z.
Review: APPROVED
Reviewed — looks good
The review covers head
efdf28dbaddb7317844cd805aae10154b0b44802; the source and test changes support the stated implementation, with the_Putsignature and facet constructors explicitly unverified against console binaries.What I ran
No build or tests were run. I read the prepared diff, all changed files’ added lines, and the relevant locale layout and facet lifecycle call sites through
repo_read.py.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the build, tests, conventions check, debt check, or overlap check; those results are author-reported in the PR description. Console ABI signatures and hardware behavior were not verified. I read all changed files’ added lines:
MoneyGetPut.cpp,InventoryExports6.hpp,GuestLibcInternalMoneyGetPut.cpp, and the debt fragment.InventoryExports6.cpphas no added lines. No changed files were excluded.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T09:22:31Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
dae682af0d:tools/check_conventions.pypassed.guest_libc_internal_money_get_put_testsbuilt cleanly.guest_libc_internal_money_get_put):core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/MoneyGetPut.cpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T09:31:40Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing in the inspected changes blocks merging; one implementation detail remains unverified against console behavior.
What I ran
Reviewed head
dae682af0de0b8504ac139dfb4469c831837415e. No commands or tests were run; author-reported checks are not treated as runs performed for this review.Read
description.md,commits.md,manifest.json, and the fulldiff.patch. Read the relevantFacet,Streambuf, and money-facet vtable declarations inGuestLocale.hpp. All six changed files are marked included inmanifest.json;review/files.jsonwas unavailable from the reader, so exclusions could not be confirmed.Results
_Putsignatures are unverifiedFindings
Blocking
None.
Non-blocking
_Putand facet constructor signatures are explicitly unverified against console binaries. Confirm their ABI on a console or against the relevant binary before relying on these exports in production.Not verified
review/files.jsoncould not be read, so any files excluded from the review bundle are unknown.To get this to a good state
Nothing is required. Optional: verify the signatures and behavior against console binaries before relying on these exports.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T10:05:07Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
8f7211cd04:tools/check_conventions.pypassed.guest_libc_internal_money_get_put_testsbuilt cleanly.guest_libc_internal_money_get_put):core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/MoneyGetPut.cpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:36:30Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: guard the put-area slot dereferences in
_Putso a null slot falls through tooverflowinstead of being dereferenced.What I ran
Reviewed head
8f7211cd045655631eab32ce3b8a2d04b907f3b1usingrepo_read.pyagainst the prepared review bundle. No build or test commands were run; results described in the PR are author-reported.Results
_Putcan dereference a null put-area slotFindings
Blocking
core/libs/prx/libSceLibcInternal/MoneyGetPut.cpp:99checks thatbuffer->putNextandbuffer->putEnd(the slot addresses) are non-null, then dereferences them. If either slot address is valid but contains a null pointer, the fast path dereferences null and crashes instead of marking the iterator failed or usingoverflow. The tests cover null values in both slots but not a null value in only one slot, so they do not exercise the unsafe dereference.Non-blocking
None.
Not verified
No tests or build were run. Console behavior and the binary signatures for the new exports remain unverified as noted in the PR. Reviewed files:
core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/MoneyGetPut.cpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp,core/libs/tests/GuestLibcInternalMoneyGetPut.cpp, anddocs/dev/debt/changes/feat-libcinternal-wide-money-facets.md. The manifest lists all five as included; no changed file was excluded.To get this to a good state
Check the loaded
putNextandputEndvalues before using the fast path, and add a test where just one slot contains null. Rerun the targeted tests and build on the updated head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:56:12Z.
Review: COMMENTED
Reviewed — no blocking findings
The reviewed code adds wide money facet construction and output, and I found no verified blocking defect; the ABI details remain unconfirmed against console binaries.
What I ran
Reviewed head
e7aeefa91e691a8726225b78cc84122e836a3361from the prepared diff and pinned source usingrepo_read.py. No build or tests were run; the test results in the PR description are author-reported.Results
Findings
Blocking
None.
Non-blocking
_Getcatsignatures and behavior, and the_Putimplementation, have not been checked against console binaries, as the PR documents. Confirm these details against the console ABI when that evidence is available.Not verified
No build, tests, convention checks, debt checks, overlap checks, or console validation were run in this review. The author reports successful tests and checks in the PR description. Read the changed files
core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/MoneyGetPut.cpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp,core/libs/tests/GuestLibcInternalMoneyGetPut.cpp, anddocs/dev/debt/changes/feat-libcinternal-wide-money-facets.md; no changed files were excluded in the manifest.To get this to a good state
Nothing is required. Optional: validate the new signatures and behavior against console binaries when available.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T11:02:18Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e7aeefa91e:tools/check_conventions.pypassed.guest_libc_internal_money_get_put_testsbuilt cleanly.guest_libc_internal_money_get_put):core/libs/prx/libSceLibcInternal/InventoryExports6.cpp,core/libs/prx/libSceLibcInternal/MoneyGetPut.cpp,core/libs/prx/libSceLibcInternal/include/InventoryExports6.hppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T15:52:15Z.
Review: COMMENTED
The branch conflicts with main in
InventoryExports6.hpp. I resolved that header locally by keeping the current typed_LocimpC2Ebdeclaration in its existing API header and taking the branch's money facet declarations. The resultingguest_libc_internal_money_get_putCTest passed on Linux.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T10:50:35Z.
Review: COMMENTED
Reviewed — no blocking findings
The source changes have no verified blocking defects, but the new
_Putsignature has not been checked against console binaries, so a formal approval is not justified.What I ran
Reviewed head
79a2d6a40a7cdccdb1bed4fc6733132b77f42238. Read the prepared diff and manifest, then usedrepo_read.pyto inspectGuestLocale.hpp,Messages.cpp, andNumPutField.cppfor the facet layout and related reference-counting and_Getcatbehavior. No tests or builds were run.Results
_Putsignature remains unverifiedFindings
Blocking
None.
Non-blocking
_Putsignature is based on Dinkumwarexlocmonand has not been checked against console binaries. Confirm the signature against the target ABI when evidence is available. The debt note records this limitation.Not verified
No tests, builds, convention checks, or console runs were performed. The author reports three targeted tests passed and reports convention, debt, and overlap checks passed; these results were not independently verified. All five changed paths listed as reviewed in
files.jsonwere represented in the prepared diff; targeted reader context was inspected for facet layout and related behavior. No files were excluded by the supplied review rules.To get this to a good state
Nothing is required. Optional: verify the
_Putsignature against console binaries when available.Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T10:58:16Z.
Review: COMMENTED
Actionable comments
823979b3-5249-43a1-8067-7f818c001bb3Reviewing files that changed from the base of the PR and between
63b98e5bf8and79a2d6a40a.core/libs/prx/libSceLibcInternal/InventoryExports6.cppcore/libs/prx/libSceLibcInternal/MoneyGetPut.cppcore/libs/prx/libSceLibcInternal/include/InventoryExports6.hppcore/libs/tests/GuestLibcInternalMoneyGetPut.cppdocs/dev/debt/changes/feat-libcinternal-wide-money-facets.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.