feat(libc): implement libc++ error category comparisons #26252
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26252"
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:57:31Z.
What
Implements libc++’s base
error_category::default_error_conditionand bothequivalentoverloads imported by the separately converted Azahar core in #5927. The comparisons match the value and category identity. The condition overload calls the category’s virtual mapping, so subclass overrides are honoured.The compiled PS5 Payload SDK v0.42 implementation confirms the 16-byte guest layout, the two-register return, and the virtual slot for the default mapping.
Tested
Windows 11 x64 and WinLibs GCC 16.2.
guest_libc_static_importspassed with checks for the full signed value, both category and value mismatches, a virtual override that changes the category and value, and unreadable operands. Conventions and whitespace checks passed.Using the same separately converted Azahar startup diagnostic and
libkernel.prx, I compared patchedlibc.prxfrom maindfe428e798and this change6ff25ebc08. The startup diagnostic dropped from 205 to 202 unresolved names, with exactly the three targeted imports removed. A local merge check with #26224 also passed.The overlap scan and manual comparison found no duplicate exports. #24322 and #24917 move the adjacent Threads.cpp entry in the libc CMake source list. If either lands first, keep the LibcxxErrorCategory.cpp entry when resolving that list.
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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-23T15:11:40Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
6ff25ebc08: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/LibcxxErrorCategory.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:14:36Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation and its focused tests support merging, with firmware export provenance and full title execution still unverified.
What I ran
Reviewed head
6ff25ebc0864064f6b39f15e044373265e343075usingrepo_read.py. No tests or build commands were run in this review; the test and startup diagnostic results below are author-reported.Results
Findings
Blocking
None.
Non-blocking
Not verified
No build, tests, firmware export inspection, console execution, or full title run was performed in this review. The author reports
guest_libc_static_importsand conventions/whitespace checks passed on Windows 11 x64 with WinLibs GCC 16.2, and reports the startup diagnostic removed the three targeted unresolved imports. The review folder contained all five changed files, and each was read:core/libs/prx/libc/CMakeLists.txt,core/libs/prx/libc/include/Api.hpp,core/libs/prx/libc/src/LibcxxErrorCategory.cpp,core/libs/tests/GuestLibcStaticImports.cpp, anddocs/dev/debt/changes/feat-libc-libcxx-error-category.md. No files were excluded.To get this to a good state
Nothing is required. Optional: verify firmware export provenance and run the implementation in a full title execution when practical.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T13:33:31Z.
Review: APPROVED
Reviewed — looks good
The implementation’s comparisons and virtual default-condition mapping are supported by the inspected code; all five changed files were read, but no checks were run in this review.
What I ran
No commands or tests were run. I read the prepared description, commit list, manifest, diff, and all five changed files through
repo_read.pyat head4e4c9890ed4f03092a1cba6036ce02606e4e76c5.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports a passing
guest_libc_static_importstest, conventions and whitespace checks, a startup diagnostic comparison, and a clean local merge check; these were not run or independently confirmed. Firmware export provenance and full title execution are also listed as needing verification in the changed debt note. No files were excluded from the review bundle.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T07:35:19Z.
Review: APPROVED
I read the diff at
4e4c9890ed. 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.The Windows CI job was cancelled at its 90 minutes; the Windows run above covers this test only, not the whole suite.
Not checked: a title.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T10:38:13Z.
Review: COMMENTED
The GuestLibcStaticImports fixture coverage passed on Linux with the exact implementation from this head. The fixture exercises comparison between error categories and conditions, including custom mappings.
AI-assisted: yes.