fix(libc): restore the macOS build by modelling the RTTI sub-kind masks #27201
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27201"
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 fishingpvalues on 2026-11-25T11:35:52Z.
What
core/libs/prx/libc/src/exception/Runtime.cpp(added bybd637b7686, "implement RTTI cast result callbacks") uses__cxxabiv1::__class_type_info::__contained_virtual_mask,__contained_public_mask,__contained_ambigand__contained_public. On Linux and Windows those come from the system libstdc++cxxabi.h. On macOS the project ships its own model of the Itanium RTTI classes incore/libs/prx/libc/include/specifics/itanium/CxxAbi.hpp, and that model only hadenum __sub_kind { __unknown = 0 }, so the full macOS build stopped at:This extends the model enumerator to the libstdc++ values the callbacks were written against (
__not_contained,__contained_ambig,__contained_virtual_mask = 1,__contained_public_mask = 2,__contained_mask = 4,__contained_private,__contained_public = 6). It only affects the_LIBCPPABI_VERSIONbranch used on macOS; Linux and Windows keep the system declarations.Tested
mainfails to buildlibcbefore the change; with it,cmake --build build --target libc --parallel 14succeeds (exit 0).python3 tools/check_conventions.py --base origin/mainandpython3 tools/debt_fold.py --checkpass.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 MarcZX10 on 2026-11-25T11:54:40Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
f89b8a55ea1cf451ef836bbe627df4479b9edfec. No build or tests were run; the description reports a successful macOS build and convention checks, but I did not independently verify them. I readdescription.md,commits.md,manifest.json,diff.patch, and the changedCxxAbi.hppin full, plus relevant sections ofRuntime.cpp,TypeInfo.cpp, andRuntime.hpp. The review file listing showed nofiles.json; the manifest lists one changed file and no exclusions.Results
Negative control
Not run; no build or test environment was available through the review tools.
Findings
Blocking
None.
Non-blocking
The new enum values match the integer values already used by the RTTI callback code. Optional: retain the reported macOS build and convention-check results in CI for this head.
Sources
Not verified
The author-reported macOS build and convention checks were not run by me. Console behavior was not tested, as the change description also notes.
To get this to a good state
Nothing is required. Optional: confirm the reported macOS build and convention checks on this head.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T13:55:32Z.
Review: COMMENTED
Compiled the exact header with Clang 19 and libc++abi and with GCC and libstdc++. Both probes verified all eight enum values. PR #26739 adds the same values to this header.
AI-assisted: yes.
Pull request closed