feat(libc): implement libc++ streambuf defaults #26224
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26224"
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 mihai1859 on 2026-11-23T14:00:00Z.
What
Implements the six base virtual methods of libc++’s narrow
basic_streambufimported by the separately converted Azahar core in #5927.syncandshowmanycreturn zero,setbufreturns the existing stream buffer, andoverflow,pbackfail, andunderflowreturn EOF. These results and the absence of state changes match the implementations inios.instantiations.cpp.ofrom the PS5 Payload SDK v0.42.The branch merges cleanly into main at
dba06f681a. #25289 adds a different source file at the same place in the libc CMake list. Both source entries can be kept when the later branch is rebased.Tested
Windows 11 x64 and WinLibs GCC 16.2.
guest_libc_static_importspassed with assertions for all six methods, including high byte inputs, a 64-bit buffer size, and preservation of the stream and buffer contents. Conventions and whitespace checks passed.Compared patched
libc.prxfrom main3f12e824a4and this change9a8458e627in the same separately converted Azahar startup diagnostic, with the samelibkernel.prx. The number of unresolved names dropped from 205 to 199. The exact difference was these six imports.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-23T14:05:01Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
9a8458e627:tools/check_conventions.pypassed.guest_libc_static_imports_testsbuilt cleanly.guest_libc_static_imports):core/libs/prx/libc/include/Api.hpp,core/libs/prx/libc/src/LibcxxStreambuf.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T08:21:06Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation and regression test support the stated narrow streambuf defaults.
What I ran
Reviewed head
9a8458e62709da3806b5aae50a8fbc6e678cfe57using the prepared diff and pinned source reader. No commands or tests were run. The author reports tests on Windows 11 x64 with WinLibs GCC 16.2.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Did not run the reported tests, verify the author’s comparison against the PS5 Payload SDK object, or test on physical firmware or with a full title. All changed files marked included in the manifest were read:
core/libs/prx/libc/CMakeLists.txt,core/libs/prx/libc/include/Api.hpp,core/libs/prx/libc/src/LibcxxStreambuf.cpp,core/libs/tests/GuestLibcStaticImports.cpp, anddocs/dev/debt/changes/feat-libc-libcxx-streambuf-defaults.md. The manifest reports no excluded changed files;files.jsonwas unavailable as a review document.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-01T19:41:27Z.
Review: APPROVED
Reviewed — looks good
The six stream-buffer defaults return the expected values, and the added tests cover their results and preservation of the stream and buffer.
What I ran
Reviewed head
300c279cff3a01c83837f032f59e42da07678e51usingrepo_read.pyin the review environment. No compiler or build tool was run; PR-reported test and diagnostic results were not independently reproduced.Results
Negative control
Not run; no test or source mutation was performed.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The author-reported Windows test run and import comparison were not independently reproduced. Physical firmware export provenance and full title execution are also unverified, as noted in the change documentation. All five files listed as reviewed in
files.jsonwere reviewed; no files were excluded. For the large CMake, API, and test files, review covered the changed lines and relevant context rather than every line.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T07:34:45Z.
Review: APPROVED
I read the diff at
300c279cff. Merged intomainat35e34b1a7f0together with other open PRs (so not an isolated build), Release, on Windows 11 (GCC 15.2) and Ubuntu 24.04 under WSL2 (GCC 13.3).guest_libc_static_imports: passes on both.guest_libcxx_*tests of that tree pass too (39 on Linux).maindoes not have.Not checked: a title.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T10:38:15Z.
Review: COMMENTED
The GuestLibcStaticImports fixture coverage passed on Linux with the exact implementation from this head. The fixture checks the default streambuf return values and verifies that the stream and source buffer stay intact.
AI-assisted: yes.
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.