feat(libc): implement the libc++ streambuf base constructor #28710
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28710"
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 cmsierrave-coder on 2026-12-03T02:12:33Z.
What
Adds the PS5 libc++ narrow
basic_streambufbase constructor (C2). It installs the shared base vtable, constructs the locale in place, then clears all six get and put pointers, matching PS5 Payload SDK v0.42. The regression fixture starts with nonzero buffer pointers, checks the default locale and empty-stream virtual calls, and destroys the object through the base vtable.Tested
Current head
21e427c3a7passed all five focused Windows MSYS2 tests: libc++ streambuf lifecycle, streambuf transfer, stream position, locale, and libc static imports. GitHub Actions run.Windows MSYS2 (UCRT64) built
libcon33b21ef65f24and passed all five focused CTests:guest_libcxx_streambuf_lifecycle,guest_libcxx_streambuf_transfer,guest_libcxx_stream_position,guest_libcxx_locale, andguest_libc_static_imports. Fork CIThe conventions, debt fragment, and whitespace checks passed. Manual diff and merge-tree checks confirmed that the branch's reported shared-file conflicts were already present in the dependency stack. Retail PS5 behavior and RetroArch startup remain unverified.
Rebuilt head
21e427c3a754da0b9d74a82207ae6dd476d9b82cis based on the verified #28709 headb0325e476369d469a46d989f9b0014522511b8a3. Conventions, debt, and whitespace checks passed. GitHub rejected the new five-test Windows dispatch with HTTP 422 (Actions disabled), so the linked passing run above applies to the older head only.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 MarcZX10 on 2026-12-03T02:28:44Z.
Review: COMMENTED
Reviewed — no blocking findings
The prepared patch shows no verified blocking defect, but repository caller context and local test execution remain unverified.
What I ran
Reviewed head
33b21ef65f24dff29063dd154de9a8ebf3ff0011against basemain; no merged preview was run. I inspected the prepared bundle in the read-only session. No build or test command was run.Results
Negative control
Not run; no tests were run in this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
Reviewed changed hunks for all 32 paths listed under
reviewedinfiles.json; the bundle lists no excluded files. The reader lookup returned a matching line but could not complete because its access log was unwritable, so caller context was not checked. Local CTests, retail firmware behavior, and RetroArch startup were not verified; the latter two are also noted as unverified in the PR description.To get this to a good state
Nothing is required. Optional: verify retail firmware behavior and RetroArch startup when that environment is available.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T02:53:15Z.
Review: COMMENTED
The supplied lifecycle fixture passed on Linux x86_64 at
33b21ef65f24. I also called both seek slots through the newly constructed object's vtable and verified the default position is −1 with a zeroed 128-byte state. With three-byte get and put buffers, each four-byte transfer stopped at three, advanced its cursor to the end, and preserved the trailing sentinel.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T01:43:17Z.
Review: COMMENTED
Actionable comments
BUILD_TESTING.e0385147-99e7-4b91-bd13-6672ec052b3cReviewing files that changed from the base of the PR and between
d0658b67a8and33b21ef65f.core/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/include/Api.hppcore/libs/prx/libc/include/GuestLocale.hppcore/libs/prx/libc/include/LibcxxStreamPosition.hppcore/libs/prx/libc/include/LibcxxStreambufTransfer.hppcore/libs/prx/libc/libc.hppcore/libs/prx/libc/src/LibcxxLocale.cppcore/libs/prx/libc/src/LibcxxLocaleFacet.cppcore/libs/prx/libc/src/LibcxxStreamPosition.cppcore/libs/prx/libc/src/LibcxxStreambuf.cppcore/libs/prx/libc/src/LibcxxStreambufLifecycle.cppcore/libs/prx/libc/src/LibcxxStreambufTransfer.cppcore/libs/prx/libc/src/exception/StandardExceptions.cppcore/libs/prx/libc/src/exception/TypeInfo.cppcore/libs/prx/libc/tests/cmake/guest_libcxx_locale.cmakecore/libs/prx/libc/tests/cmake/guest_libcxx_stream_position.cmakecore/libs/prx/libc/tests/cmake/guest_libcxx_streambuf_lifecycle.cmakecore/libs/prx/libc/tests/cmake/guest_libcxx_streambuf_transfer.cmakecore/libs/tests/GuardedBuffer.hppcore/libs/tests/GuestLibcStaticImports.cppcore/libs/tests/GuestLibcxxLocale.cppcore/libs/tests/GuestLibcxxStreamPosition.cppcore/libs/tests/GuestLibcxxStreambufLifecycle.cppcore/libs/tests/GuestLibcxxStreambufTransfer.cppdocs/dev/debt/changes/feat-libc-libcxx-locale-facet-base.mddocs/dev/debt/changes/feat-libc-libcxx-locale.mddocs/dev/debt/changes/feat-libc-libcxx-streambuf-defaults.mddocs/dev/debt/changes/feat-libc-streambuf-construction.mddocs/dev/debt/changes/feat-libc-streambuf-destruction.mddocs/dev/debt/changes/feat-libc-streambuf-metadata.mddocs/dev/debt/changes/feat-libc-streambuf-seek.mddocs/dev/debt/changes/feat-libc-streambuf-transfers.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T02:10:09Z.
Review: COMMENTED
Actionable comments
16195e0b-54d3-4921-8b46-7a196a039a23Reviewing files that changed from the base of the PR and between
33b21ef65fandad48147e0f.core/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/include/Api.hppcore/libs/prx/libc/libc.hppcore/libs/tests/GuardedBuffer.hppcore/libs/tests/GuestLibcStaticImports.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-04T03:00:40Z.
Review: COMMENTED
Actionable comments
core/libs/prx/libc/src/LibcxxStreambufTransfer.cpp, lines83· 🚀 Performance & Scalability · ⚡ Quick winuflowreturns one character without retaining a get area, this check runs once per output byte. On Linux,GuestWritable_nid_no_patchcallsHostMapping::Find. WithoutPROCMAP_QUERY, each call opens and scans/proc/self/maps. A 1 MiB read therefore performs 1,048,576 scans. (raw.githubusercontent.com)43de4b43-011d-4288-825c-f39b867bdc95Reviewing files that changed from the base of the PR and between
ad48147e0fand21e427c3a7.core/libs/prx/libc/CMakeLists.txtcore/libs/prx/libc/libc.hppcore/libs/prx/libc/src/LibcxxStreambufTransfer.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T03:17:32Z.
Review: APPROVED
Reviewed — looks good
The implementation and all 25 reviewed changed files show no verified blocking defects at head
21e427c3a754da0b9d74a82207ae6dd476d9b82c.What I ran
Read
description.md,commits.md,manifest.json,files.json, anddiff.patch; inspected changed code and targeted source context withrepo_read.pysearch and cat at the pinned head. No build or tests were run. The author reports five focused tests passed on an earlier head; the test dispatch for this head was rejected.Results
files.jsonlists noneNegative control
Not run; no code or tests were changed during this review.
Findings
Blocking
None.
Non-blocking
None.
Sources
The streambuf lifecycle and vtable implementation are in
LibcxxStreambufLifecycle.cpp, and transfer behavior is inLibcxxStreambufTransfer.cpp. The added lifecycle and transfer cases are inGuestLibcxxStreambufLifecycle.cppandGuestLibcxxStreambufTransfer.cpp.Not verified
No build or tests were run on this head. Retail PS5 behavior and RetroArch startup remain unverified. All 25 paths listed under
reviewedinfiles.jsonwere inspected; there are no excluded paths.To get this to a good state
Nothing is required.
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.