feat(libSceLibcInternal): implement zero-return showmanyc exports #14401
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14401"
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 xdCloudy on 2026-11-01T11:33:49Z.
What
Implements two existing
libSceLibcInternalexports forstd::basic_streambuf::showmanyc:IAEl1Ta7yVUstd::basic_streambuf<char>std::streamsizeolsoiZsezkkstd::basic_streambuf<wchar_t>std::streamsizeBoth implementations return zero without modifying the stream buffer.
Ghidra inspection of the locally held PS5 firmware 13.60
libSceLibcInternal.sprxresolved the NIDs at RVAs0x00092b30and0x000c2c80. Both complete function bodies contain31 c0 c3(xor eax, eax; ret).The revision-pinned ps5rs NID catalog identifies the narrow and wide Itanium names. The C++ stream buffer contract also specifies zero for the base
showmanycimplementation.Changes:
APS5_VABIcalling convention.No firmware binaries or new third-party dependencies are included.
Evidence
std::streamsizesignatures.Tested
Windows x86_64, WinLibs GCC, CMake/Ninja Release:
guest_libc_internal_showmanyc_tests;guest_libc_internal_showmanycpassed after integrating upstream main5bae1a4bc2.31 c0 c3. SHA-256:a2d70cc64c3abc3927662cbe0c3765b74b2385b4b2ad80eb7b942a891f9259fb.eeef26f744additionally records the exact addresses/digest and static-evidence limits in technical debt; that final change is documentation only.No console measurement or new full Linux/runtime-suite pass is claimed. New-head hosted checks are pending.
Overlap audit
Current upstream main
5bae1a4bc2is integrated cleanly. The net PR diff remains the five intended files and the same two NIDs.The earlier official overlap scanner failed closed on shared debt documentation and incomplete comparisons with conflicting external PRs. Those patches were manually examined and no duplicate implementation of either target NID was identified. No fresh passing official scanner run is claimed; that historical limitation remains disclosed. Adjacent changes may require ordinary merge-order reconciliation.
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 repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T13:59:57Z.
Review: COMMENTED
Reviewed — no blocking findings
The two
showmanycexports return zero without touching the buffer, which is what the basestd::basic_streambuf::showmanyccontract specifies, and their NIDs match the Itanium names of those two specializations; I am not approving because the firmware evidence for the function bodies is not checkable here.What I ran
07857a0650086d3d972a77e62c3063c6ad9d575e, baseb2620e56d1(the PR base)./usr/bin/python33.11.2, no build.python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14401 --output-dir /dev/shm/reviewer-run/precheck/14401python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base b2620e56d1 --head 07857a0650086d3d972a77e62c3063c6ad9d575e --json(exit 0;passed; 0 findings).tools/nid_names.py,compute_nid) for the Itanium names_ZNSt15basic_streambufIcSt11char_traitsIcEE9showmanycEvand_ZNSt15basic_streambufIwSt11char_traitsIwEE9showmanycEv: they giveIAEl1Ta7yVUandolsoiZsezkk, the NIDs the exports carry.core/libs/tests/GuestLibcInternalShowmanyc.cppfrom a head extract: one literal-path registration heuristic; the test is registered incore/libs/prx/libSceLibcInternal/CMakeLists.txtwith${LIBS_INCLUDE_DIR}.InventoryExports.cpp(both exports),include/InventoryExports.hpp(the typed declarations), the CMake registration and the test.Results
Precheck report, checks table, unedited (
/dev/shm/reviewer-run/precheck/14401/report.md):The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check b2620e56d114ef053f8b45433b1d48aff7ec37ba...07857a0650086d3d972a77e62c3063c6ad9d575e/usr/bin/python3 tools/check_conventions.py --base b2620e56d114ef053f8b45433b1d48aff7ec37ba --head 07857a0650086d3d972a77e62c3063c6ad9d575e --title feat(libSceLibcInternal): implement zero-return showmanyc exports --body /dev/shm/reviewer-run/precheck/14401/pr-body.md/usr/bin/python3 tools/pr_abi_audit.py --base b2620e56d114ef053f8b45433b1d48aff7ec37ba --head 07857a0650086d3d972a77e62c3063c6ad9d575e --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14401 --repo boykopovar/AnyPS5 --output-dir /dev/shm/reviewer-run/precheck/14401/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./usr/bin/python3 /dev/shm/reviewer-run/precheck/14401/head-07857a065008-1d05bca6/tools/pr_test_quality.py --root /dev/shm/reviewer-run/precheck/14401/head-07857a065008-1d05bca6 --json core/libs/prx/libSceLibcInternal/CMakeLists.txt core/libs/prx/libSceLibcInternal/InventoryExports.cpp core/libs/prx/libSceLibcInternal/include/InventoryExports.hpp core/libs/tests/GuestLibcInternalShowmanyc.cpp docs/dev/debt/libSceLibcInternal.mdNo changed Python test module in tools/ can be run as a no-build base-source control.Hosted at this head:
windows,conventions,library-portabilityandreportsucceeded;linux,relinkerandrelinker-asanwere skipped by the workflow; three earlierconventionsruns were cancelled.Negative control
Not run. On base the test would fail to compile: its two
static_asserts compare the export types with theint ()declarations that base has, so the signature change is what the test checks.Findings
Blocking: none.
Non-blocking:
0x00092b30and0x000c2c80, bodies31 c0 c3) cannot be reproduced here because the firmware is not in the repository. The NID computation above only confirms the names, not the bodies.InventoryExports.hppinclude of<streambuf>sits before theextern "C"block, which is correct; no other change to the header.Sources
github.com/boykopovar/AnyPS5@07857a0650/core/libs/prx/libSceLibcInternal/InventoryExports.cppgithub.com/boykopovar/AnyPS5@07857a0650/core/libs/tests/GuestLibcInternalShowmanyc.cppNot verified
static_asserts and runtime checks are unverified on this head.linux,relinkerandrelinker-asanwere skipped at this head, so no Linux test result exists.