feat(libc): export the messages facet vtable as data #10158

Merged
mazen320 merged 5 commits from upstream-pr/10158 into main 2026-11-05 23:17:40 +00:00
mazen320 commented 2026-10-23 11:14:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mazen320 on 2026-10-23T11:14:27Z.


What

Export messages<char>'s vtable (NID FnEnECMJGag) as nine zeroed uintptr_t slots so titles that resolve it as data get a 72-byte object matching console title libc.prx (PPSA26344; same st_size as PPSA16833). Facet calls through the slots still fault until methods are wired (debt note).

#9038 (codecvt / numpunct / time_put _Getcat) has landed. Remaining open PRs that also touch docs/dev/debt/libc.md (#6565 guest-arena lease note; #9371 symlink/.. debt note) edit different sections of that file from this messages-vtable entry; compose with keep-both on rebase, not a stack. #10200 (numpunct vtable data) Depends on this PR and lands next among the locale facet-vtable exports.

Tested

  • guest_locale_tests — passed (Windows MinGW).
  • python tools/check_conventions.py --base upstream/main — passed.
  • Console: FnEnECMJGag is STT_OBJECT st_size 72 in PPSA26344 sce_module/libc.prx (dynsym via PT_DYNAMIC; FTP from the console).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (#9038 landed; #6565/#9371 share only other libc.md sections — keep-both)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (libc data export)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4981873545 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10158). Originally posted by [mazen320](https://github.com/mazen320) on 2026-10-23T11:14:27Z. --- ### What Export `messages<char>`'s vtable (NID `FnEnECMJGag`) as nine zeroed `uintptr_t` slots so titles that resolve it as data get a 72-byte object matching console title `libc.prx` (PPSA26344; same `st_size` as PPSA16833). Facet calls through the slots still fault until methods are wired (debt note). #9038 (`codecvt` / `numpunct` / `time_put` `_Getcat`) has landed. Remaining open PRs that also touch `docs/dev/debt/libc.md` (#6565 guest-arena lease note; #9371 symlink/`..` debt note) edit different sections of that file from this messages-vtable entry; compose with keep-both on rebase, not a stack. #10200 (`numpunct` vtable data) Depends on this PR and lands next among the locale facet-vtable exports. ### Tested - `guest_locale_tests` — passed (Windows MinGW). - `python tools/check_conventions.py --base upstream/main` — passed. - Console: `FnEnECMJGag` is STT_OBJECT `st_size` 72 in PPSA26344 `sce_module/libc.prx` (dynsym via PT_DYNAMIC; FTP from the console). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none (#9038 landed; #6565/#9371 share only other `libc.md` sections — keep-both) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (libc data export) - [x] AI-assisted: yes
MarcZX10 commented 2026-10-23 11:22:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T11:22:03Z.

Review: APPROVED


Reviewed the current head 607cb17e0df5e690f670d4195b1904ff2f3a8fa5. I ran GCC 12.2 syntax-only checks for LocaleSupport.cpp and GuestLocale.cpp, then compiled the exact LocaleSupport.cpp, linked a small runtime harness, and verified all nine exported slots are zero-initialized and writable; nm -S reports the symbol size as 72 bytes. The hosted Windows relinker has now passed, as have the macOS and Ubuntu relinker runs, ASan, write-watch and register-context checks. The Linux/Windows product jobs are path-skipped, so I am not claiming those builds ran. The exact diff passes conventions, git diff --check, and a clean merge preview against current main. The body includes the NID and 72-byte console symbol evidence and separates the related facet PRs as orthogonal.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5627529302 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10158#pullrequestreview-5627529302). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T11:22:03Z. **Review:** APPROVED --- Reviewed the current head `607cb17e0df5e690f670d4195b1904ff2f3a8fa5`. I ran GCC 12.2 syntax-only checks for `LocaleSupport.cpp` and `GuestLocale.cpp`, then compiled the exact `LocaleSupport.cpp`, linked a small runtime harness, and verified all nine exported slots are zero-initialized and writable; `nm -S` reports the symbol size as 72 bytes. The hosted Windows relinker has now passed, as have the macOS and Ubuntu relinker runs, ASan, write-watch and register-context checks. The Linux/Windows product jobs are path-skipped, so I am not claiming those builds ran. The exact diff passes conventions, `git diff --check`, and a clean merge preview against current `main`. The body includes the NID and 72-byte console symbol evidence and separates the related facet PRs as orthogonal.
MarcZX10 commented 2026-10-23 13:03:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T13:03:57Z.

Review: CHANGES_REQUESTED


Correction to my earlier approval: I missed the subsequent overlap report, so that approval was premature. On the exact head 607cb17e0df5a690f670d4195b1904ff2f3a8fa5, the report identifies open #9038 in GuestLocale.cpp and open #6565/#9371 in the same libc.md line. The checklist still says Depends on: none, and I do not find an agreed landing order in this PR. CONTRIBUTING.md asks authors to agree which overlapping PR lands first and declare it with Depends on. Please coordinate with the affected authors and update the checklist to reflect the agreed order, preserving each change. This is a merge-sequencing requirement; I am not asking anyone to close or abandon a PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5628598695 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10158#pullrequestreview-5628598695). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T13:03:57Z. **Review:** CHANGES_REQUESTED --- Correction to my earlier approval: I missed the subsequent overlap report, so that approval was premature. On the exact head `607cb17e0df5a690f670d4195b1904ff2f3a8fa5`, the report identifies open #9038 in `GuestLocale.cpp` and open #6565/#9371 in the same `libc.md` line. The checklist still says `Depends on: none`, and I do not find an agreed landing order in this PR. CONTRIBUTING.md asks authors to agree which overlapping PR lands first and declare it with `Depends on`. Please coordinate with the affected authors and update the checklist to reflect the agreed order, preserving each change. This is a merge-sequencing requirement; I am not asking anyone to close or abandon a PR.
MarcZX10 commented 2026-10-29 05:29:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T05:29:19Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested

The mainline rebase and test rerun address my earlier merge-order concern. One checklist value still uses the wrong field: Unblocks is for a title ID and its Game bring-up discussion, while #10200’s dependency on this PR belongs in Depends on.

What I ran

  • Reviewed exact head 3b6fc299813d14a023d0cbe214cedf50a1fa7029 against current main 52c09d567d.
  • Ran git merge-tree --write-tree and git diff --check against current main.
  • Inspected the current PR checklist and #10200’s dependency declaration.
  • I did not rerun guest_locale_tests or conventions locally.

Results

Check Result
Current-main merge preview Clean
git diff --check Pass
Focused test Author reports guest_locale_tests passes on exact head (Windows MinGW)
Conventions Author reports check_conventions.py --base upstream/main passes
Hosted checks Windows and Ubuntu register-context/relinker checks pass; macOS register-context, write-watch and relinker checks were pending when checked; Linux product job is skipped

Findings

Blocking

The PR body currently says Unblocks: #10200. The checklist defines Unblocks for a title ID and its Game bring-up discussion; PR sequencing belongs in Depends on. The separate #10200 body already records Depends on: #10158, so please change this PR’s Unblocks line to none (unless it directly unblocks a title, in which case list that title and discussion number).

This is a checklist correction only; I found no new code or test issue in the rebase.

Sources

Not verified

  • The focused test and conventions results are author-reported; I did not run them locally.
  • macOS hosted jobs were pending when checked, and Linux product jobs are skipped.

To get this to a good state

Correct the Unblocks field and rerun the report/checklist validation on the updated PR description.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693271478 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10158#pullrequestreview-5693271478). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T05:29:19Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes requested The mainline rebase and test rerun address my earlier merge-order concern. One checklist value still uses the wrong field: Unblocks is for a title ID and its Game bring-up discussion, while #10200’s dependency on this PR belongs in Depends on. ## What I ran - Reviewed exact head 3b6fc299813d14a023d0cbe214cedf50a1fa7029 against current main 52c09d567d2fa453494dd720fcf53a98149468e4. - Ran git merge-tree --write-tree and git diff --check against current main. - Inspected the current PR checklist and #10200’s dependency declaration. - I did not rerun guest_locale_tests or conventions locally. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | git diff --check | Pass | | Focused test | Author reports guest_locale_tests passes on exact head (Windows MinGW) | | Conventions | Author reports check_conventions.py --base upstream/main passes | | Hosted checks | Windows and Ubuntu register-context/relinker checks pass; macOS register-context, write-watch and relinker checks were pending when checked; Linux product job is skipped | ## Findings ### Blocking The PR body currently says Unblocks: #10200. The checklist defines Unblocks for a title ID and its Game bring-up discussion; PR sequencing belongs in Depends on. The separate #10200 body already records Depends on: #10158, so please change this PR’s Unblocks line to none (unless it directly unblocks a title, in which case list that title and discussion number). This is a checklist correction only; I found no new code or test issue in the rebase. ## Sources - [Contribution checklist rules at current main](https://github.com/boykopovar/AnyPS5/blob/52c09d567d2fa453494dd720fcf53a98149468e4/CONTRIBUTING.md#L60-L67) - [#10158 current head](https://github.com/boykopovar/AnyPS5/tree/3b6fc299813d14a023d0cbe214cedf50a1fa7029) - [#10200 dependency on #10158](https://github.com/boykopovar/AnyPS5/pull/10200) ## Not verified - The focused test and conventions results are author-reported; I did not run them locally. - macOS hosted jobs were pending when checked, and Linux product jobs are skipped. ## To get this to a good state Correct the Unblocks field and rerun the report/checklist validation on the updated PR description.
MarcZX10 commented 2026-10-29 05:37:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T05:37:28Z.

Review: APPROVED


Re-checked — approved

The requested checklist correction is in place: Unblocks: none, with #10200 correctly described as depending on this PR. The earlier mainline and overlap sequencing concern is also addressed in the PR description.

What I ran

  • Reviewed exact head 3b6fc299813d14a023d0cbe214cedf50a1fa7029 against current main 52c09d567d2fa453494dd720fcf53a98149468e4.
  • Ran git merge-tree --write-tree and git diff --check.
  • Checked the exact-head test/conventions report and current CI.

Results

Check Result
Current-main merge preview Clean
git diff --check Passed
Checklist Unblocks: none; #10200 remains in Depends on/landing-order text
Focused test and conventions Author reports guest_locale_tests and conventions passed on this head
Hosted checks Windows, eligibility, conventions, labels, report, Linux/Ubuntu relinker, and register-context checks pass; several macOS jobs are still in progress or queued; product Linux is skipped

I did not run a local build. The outstanding macOS checks are still pending, not failed; the exact-head focused report and clean diff resolve my requested change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693327203 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10158#pullrequestreview-5693327203). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T05:37:28Z. **Review:** APPROVED --- # Re-checked — approved The requested checklist correction is in place: `Unblocks: none`, with #10200 correctly described as depending on this PR. The earlier mainline and overlap sequencing concern is also addressed in the PR description. ## What I ran - Reviewed exact head `3b6fc299813d14a023d0cbe214cedf50a1fa7029` against current `main` `52c09d567d2fa453494dd720fcf53a98149468e4`. - Ran `git merge-tree --write-tree` and `git diff --check`. - Checked the exact-head test/conventions report and current CI. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | `git diff --check` | Passed | | Checklist | `Unblocks: none`; #10200 remains in `Depends on`/landing-order text | | Focused test and conventions | Author reports `guest_locale_tests` and conventions passed on this head | | Hosted checks | Windows, eligibility, conventions, labels, report, Linux/Ubuntu relinker, and register-context checks pass; several macOS jobs are still in progress or queued; product Linux is skipped | I did not run a local build. The outstanding macOS checks are still pending, not failed; the exact-head focused report and clean diff resolve my requested change.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10158
No description provided.