feat(libc): export the wide num_get facet vtable as data #9468

Merged
mazen320 merged 2 commits from upstream-pr/9468 into main 2026-10-26 12:21:20 +00:00
mazen320 commented 2026-10-21 22:51:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mazen320 on 2026-10-21T22:51:12Z.


What

Export num_get<wchar_t>'s vtable (NID Y9C9GeKyZ3A) as seventeen zeroed uintptr_t slots so titles that resolve it as data get a 136-byte object matching console libSceLibcInternal, same pattern as the narrow num_get vtable. Facet calls through the slots still fault until methods are wired (debt note). Wide counterpart to the narrow num_get vtable in #8880; merge after that PR so the paired debt notes and GuestLocale checks land in order. Additive with #9038/#9456/#9464 (distinct NIDs). Shared GuestLocale.cpp edits with #6044 are additive test helpers only.

Tested

  • ctest --test-dir build-win -R guest_locale — passed (Windows MinGW), after rebase onto upstream/main 110a18ba0.
  • python tools/check_conventions.py --base upstream/main — passed.
  • Console: Y9C9GeKyZ3A is STT_OBJECT st_size 136 in firmware libSceLibcInternal.sprx (FTP measurement).

Checklist

  • Depends on: #9464
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4959419276 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9468). Originally posted by [mazen320](https://github.com/mazen320) on 2026-10-21T22:51:12Z. --- ### What Export `num_get<wchar_t>`'s vtable (NID `Y9C9GeKyZ3A`) as seventeen zeroed `uintptr_t` slots so titles that resolve it as data get a 136-byte object matching console `libSceLibcInternal`, same pattern as the narrow `num_get` vtable. Facet calls through the slots still fault until methods are wired (debt note). Wide counterpart to the narrow `num_get` vtable in #8880; merge after that PR so the paired debt notes and `GuestLocale` checks land in order. Additive with #9038/#9456/#9464 (distinct NIDs). Shared `GuestLocale.cpp` edits with #6044 are additive test helpers only. ### Tested - `ctest --test-dir build-win -R guest_locale` — passed (Windows MinGW), after rebase onto `upstream/main` `110a18ba0`. - `python tools/check_conventions.py --base upstream/main` — passed. - Console: `Y9C9GeKyZ3A` is STT_OBJECT st_size 136 in firmware `libSceLibcInternal.sprx` (FTP measurement). ### Checklist - Depends on: #9464 - Fixes: none - Unblocks: none - GPUs tested: n/a - AI-assisted: yes
MarcZX10 commented 2026-10-21 22:57:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T22:57:56Z.

Review: APPROVED


Reviewed the wide num_get<wchar_t> data object against the narrow num_get<char> work in #8880. The symbols and NIDs are distinct; the 17-slot array is 136 bytes, and the locale test checks zero initialization and writability. The debt note clearly records the unsupported virtual calls. Eligibility, conventions, intake, labels, report, all relinker variants, register-context jobs and both write-watch jobs pass; aggregate Linux/Windows jobs are skipped for the changed paths.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607242938 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9468#pullrequestreview-5607242938). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T22:57:56Z. **Review:** APPROVED --- Reviewed the wide `num_get<wchar_t>` data object against the narrow `num_get<char>` work in #8880. The symbols and NIDs are distinct; the 17-slot array is 136 bytes, and the locale test checks zero initialization and writability. The debt note clearly records the unsupported virtual calls. Eligibility, conventions, intake, labels, report, all relinker variants, register-context jobs and both write-watch jobs pass; aggregate Linux/Windows jobs are skipped for the changed paths.
MarcZX10 commented 2026-10-22 04:33:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:33:26Z.

Review: DISMISSED


The wide vtable implementation and the reported guest_locale check are sound as reviewed, but I found two repository-rule items that need updating before the approval can be treated as current. First, this branch and its tested base are 47 commits behind current main (110a18ba01); please rebase and rerun the focused test and conventions/overlap checks. Second, the overlap report identifies open locale work in #8880 and #9038 at LocaleSupport.cpp/GuestLocale.cpp, plus an unreviewed conflict in GuestLocale.cpp with #6044. The body currently says Depends on: none and does not record an agreed merge order. Please verify the exact interaction with each PR, record the required Depends on: #N and ordering when it is a prerequisite (or document why it is independent), and ensure both tests and debt entries survive the chosen order. Finally, Unblocks needs none or a title ID with its Game bring-up discussion, per the template; the current generic description is not enough. No local test was run for this follow-up.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609296556 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9468#pullrequestreview-5609296556). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T04:33:26Z. **Review:** DISMISSED --- The wide vtable implementation and the reported `guest_locale` check are sound as reviewed, but I found two repository-rule items that need updating before the approval can be treated as current. First, this branch and its tested base are 47 commits behind current `main` (`110a18ba01`); please rebase and rerun the focused test and conventions/overlap checks. Second, the overlap report identifies open locale work in #8880 and #9038 at `LocaleSupport.cpp`/`GuestLocale.cpp`, plus an unreviewed conflict in `GuestLocale.cpp` with #6044. The body currently says `Depends on: none` and does not record an agreed merge order. Please verify the exact interaction with each PR, record the required `Depends on: #N` and ordering when it is a prerequisite (or document why it is independent), and ensure both tests and debt entries survive the chosen order. Finally, `Unblocks` needs `none` or a title ID with its Game bring-up discussion, per the template; the current generic description is not enough. No local test was run for this follow-up.
mazen320 commented 2026-10-22 04:37:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mazen320 on 2026-10-22T04:37:26Z.


Rebased onto current main (110a18ba0), reran guest_locale and conventions (both passed). Updated the checklist: Unblocks: none, and recorded Depends on / merge order vs the overlapping locale PRs as requested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6332825026 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9468#issuecomment-6332825026). Originally posted by [mazen320](https://github.com/mazen320) on 2026-10-22T04:37:26Z. --- Rebased onto current `main` (`110a18ba0`), reran `guest_locale` and conventions (both passed). Updated the checklist: `Unblocks: none`, and recorded `Depends on` / merge order vs the overlapping locale PRs as requested.
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!9468
No description provided.