feat(libSceLibcInternal): complete global locale lifecycle #22370

Merged
MarrasFederico merged 5 commits from upstream-pr/22370 into main 2026-11-26 04:26:58 +00:00
MarrasFederico commented 2026-11-17 13:10:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-11-17T13:10:43Z.


What

Implements three unversioned locale exports of libSceLibcInternal in core/libs/prx/libSceLibcInternal/LocaleObjects.cpp backed by shared unversioned global-locale state and _Locimp vtable helpers in core/libs/prx/libc/src/LocaleSupport.cpp:

  • _ZNSt6locale6globalERKS_ (ptwhA0BQVeE): validates arguments, checks non-"*" locale names with setlocale_nid_postfix, swaps g_globalLocale under g_localeInitMutex and transfers the previous global reference to the returned locale via sret (GuestLocaleFacade*). Swapping to the existing global locale retains an additional reference for the returned locale. Updates _ZNSt6locale5_InitEv and _ZNSt6locale16_GetgloballocaleEv to read g_globalLocale instead of hardcoding &g_classicLocale, without altering std::__sce_v2.
  • _ZNSt6locale7_LocimpC2Eb (zrmR88ClfOs): initializes GuestLocale::Implementation with LibcLocimpVtable_nid_no_patch(), references = 1, facets = nullptr, facetCount = 0, category = 0, transparent, and name = "*"; DestroyLocimp/DeleteLocimp release facets via ApplicationHeapFree_nid_no_patch and delete self via _ZdlPv_nid_postfix.
  • _ZNSt8_LocinfoC1EiPKc (L1Ze94yof2I): validates self and STL _M_* category bitmasks 0..0x3f (_X_COLLATE.._X_MESSAGES), then delegates "C" validation and 64-byte initialization to _ZNSt8_LocinfoC1EPKc_nid_postfix.

Sources: Microsoft STL commit 165a67afdd (xlocale, xlocinfo, locale0.cpp, locale.cpp), C++ [locale.statics], and existing GuestLocale structures in core/libs/prx/libc/include/GuestLocale.hpp. The _Locinfo(int, const char*) overload and STL category mask definitions are cited at pinned xlocinfo lines 28–44 and 259–270. Known limits (not verified against console libSceLibcInternal.sprx disassembly, _Locimp frees facets without per-facet decref to match _Locimp::_Addfac, only "C" supported) are recorded in docs/dev/debt/changes/feat-libcinternal-locale-state.md. The category effect is not independently observable with only "C" supported. When a stream's transparent locale falls back to the global one, the lookup retains the global _Locimp through a GuestLocale::GlobalLocaleHold (LibcAcquireGlobalLocale_nid_no_patch under g_localeInitMutex, released through the vtable when the hold leaves scope). Each caller keeps the hold for as long as it uses the facet, so a concurrent locale::global followed by the destruction of the previous locale cannot free it underneath. This covers the libc stream helpers, TimeGetFields.cpp and NumGet.cpp. _Getgloballocale itself still returns a borrowed pointer, as the console export does.

Tested

At head c4c91b1c38:

  • Linux (GCC 15.2, Release): guest_libc_internal_locale_state 3/3, and ^guest_(libc|exception) 108/108. CheckGlobalFacetHeldAcrossSwap holds a facet of global locale A, swaps the global to B and destroys the returned A, then requires that A and its facet vector are still alive and that the facet still reads its value; releasing the hold frees A exactly once. With the retain removed from LibcAcquireGlobalLocale_nid_no_patch it fails on "held global locale A must not be freed after the swap".
  • Windows (MSYS2 UCRT64): guest_libc_internal_locale_state 3/3.

Earlier runs:

Coordinator final verification at 17437fc05514104ea1114ad13a1793a6eb196e37: focused rebuild (nice -n 19, --parallel 7), three repeated locale-state runs including two concurrent swap/consumer threads (300 iterations each), and the 13-test neighbor suite all passed. Conventions/header audit/diff checks passed. Clean merge-tree against upstream/main 9dcf9837ff7b7d51cdfa9057b0ad5ed2ac0fd651; fresh names scan examined all 1689 open PRs with no competing implementation.

  • Linux (Ubuntu, GCC 15.2.0, Ninja, Release): guest_libc_internal_locale_state (3/3 consecutive runs passed, 0.01 s each), covering _LocimpC2Eb(false/true) with guard canaries and _Addfac heap cleanup, _LocinfoC1EiPKc across single and combined category masks (0..0x3f) and invalid category/name errors, and locale::global transitions (classic -> A -> B -> B -> classic) verified through _Getgloballocale, _Init, sret lifetime after caller releases, num_put<char> formatting ("1.5" / "1,5" / "1;5"), and negative-input state preservation.
  • Neighbor and PRX verification (13/13 passed, 0.24 s): patched_libraries (libSceLibcInternal.prx exports ptwhA0BQVeE, zrmR88ClfOs, L1Ze94yof2I), guest_sce_v2_locale_basics, guest_locale, guest_rune_locale, guest_sce_v2_locale, guest_libc_internal_num_get, guest_libc_internal_numpunct, guest_libc_internal_wide_numpunct, guest_libc_internal_time_get, guest_time_get_order, guest_libc_internal_locale_objects, guest_libc_internal_locale_state, and guest_libc_internal_time_get_fields.
  • Negative controls (core/libs/prx/libSceLibcInternal/LocaleObjects.cpp): bypassing global swap in _ZNSt6locale6globalERKS__nid_postfix failed guest_libc_internal_locale_state (exit 8, aborting on global(A) retains A while caller holds A); ignoring category in _ZNSt8_LocinfoC1EiPKc_nid_postfix failed (exit 8, aborting on _LocinfoC1EiPKc rejects invalid category); byte-exact restore (sha256 verified) and 3/3 positive re-runs passed.
  • Static checks: python3 tools/check_conventions.py --base upstream/main passed (All conventions checks passed.); python3 core/libs/tests/test_public_headers.py --audit-only passed (413 libraries, 34705 exports); git diff --check clean; scratch debt_fold.py --check excluding main's pre-existing fix-libc-wcstombs-zero-capacity.md duplicate exited 0.

Checked on November 18, 2026: head 41a8dec3df970b72ef15e78e73de75203eca0499 has a clean merge with main at 02650d94a5f171dc333d13fc5abed43faf440a1a and passes git diff --check. The current code also validates the facet vector and reads the locale name through the guest string helper. The detailed focused runs above are from the stated historical head.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5357467601 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-11-17T13:10:43Z. --- ### What Implements three unversioned locale exports of `libSceLibcInternal` in [`core/libs/prx/libSceLibcInternal/LocaleObjects.cpp`](core/libs/prx/libSceLibcInternal/LocaleObjects.cpp) backed by shared unversioned global-locale state and `_Locimp` vtable helpers in [`core/libs/prx/libc/src/LocaleSupport.cpp`](core/libs/prx/libc/src/LocaleSupport.cpp): - `_ZNSt6locale6globalERKS_` (`ptwhA0BQVeE`): validates arguments, checks non-`"*"` locale names with `setlocale_nid_postfix`, swaps `g_globalLocale` under `g_localeInitMutex` and transfers the previous global reference to the returned locale via `sret` (`GuestLocaleFacade*`). Swapping to the existing global locale retains an additional reference for the returned locale. Updates `_ZNSt6locale5_InitEv` and `_ZNSt6locale16_GetgloballocaleEv` to read `g_globalLocale` instead of hardcoding `&g_classicLocale`, without altering `std::__sce_v2`. - `_ZNSt6locale7_LocimpC2Eb` (`zrmR88ClfOs`): initializes `GuestLocale::Implementation` with `LibcLocimpVtable_nid_no_patch()`, `references = 1`, `facets = nullptr`, `facetCount = 0`, `category = 0`, `transparent`, and `name = "*"`; `DestroyLocimp`/`DeleteLocimp` release `facets` via `ApplicationHeapFree_nid_no_patch` and delete `self` via `_ZdlPv_nid_postfix`. - `_ZNSt8_LocinfoC1EiPKc` (`L1Ze94yof2I`): validates `self` and STL `_M_*` category bitmasks `0..0x3f` (`_X_COLLATE.._X_MESSAGES`), then delegates `"C"` validation and 64-byte initialization to `_ZNSt8_LocinfoC1EPKc_nid_postfix`. Sources: Microsoft STL commit `165a67afdd` (`xlocale`, `xlocinfo`, `locale0.cpp`, `locale.cpp`), C++ `[locale.statics]`, and existing `GuestLocale` structures in [`core/libs/prx/libc/include/GuestLocale.hpp`](core/libs/prx/libc/include/GuestLocale.hpp). The `_Locinfo(int, const char*)` overload and STL category mask definitions are cited at [pinned xlocinfo lines 28–44](https://github.com/microsoft/STL/blob/165a67afdde92bf3e5248be35b6f9240b3d1efb5/stl/inc/xlocinfo#L28-L44) and [259–270](https://github.com/microsoft/STL/blob/165a67afdde92bf3e5248be35b6f9240b3d1efb5/stl/inc/xlocinfo#L259-L270). Known limits (not verified against console `libSceLibcInternal.sprx` disassembly, `_Locimp` frees `facets` without per-facet decref to match `_Locimp::_Addfac`, only `"C"` supported) are recorded in [`docs/dev/debt/changes/feat-libcinternal-locale-state.md`](docs/dev/debt/changes/feat-libcinternal-locale-state.md). The category effect is not independently observable with only `"C"` supported. When a stream's transparent locale falls back to the global one, the lookup retains the global `_Locimp` through a `GuestLocale::GlobalLocaleHold` (`LibcAcquireGlobalLocale_nid_no_patch` under `g_localeInitMutex`, released through the vtable when the hold leaves scope). Each caller keeps the hold for as long as it uses the facet, so a concurrent `locale::global` followed by the destruction of the previous locale cannot free it underneath. This covers the libc stream helpers, `TimeGetFields.cpp` and `NumGet.cpp`. `_Getgloballocale` itself still returns a borrowed pointer, as the console export does. ### Tested At head `c4c91b1c38`: - Linux (GCC 15.2, Release): `guest_libc_internal_locale_state` 3/3, and `^guest_(libc|exception)` 108/108. `CheckGlobalFacetHeldAcrossSwap` holds a facet of global locale A, swaps the global to B and destroys the returned A, then requires that A and its facet vector are still alive and that the facet still reads its value; releasing the hold frees A exactly once. With the retain removed from `LibcAcquireGlobalLocale_nid_no_patch` it fails on "held global locale A must not be freed after the swap". - Windows (MSYS2 UCRT64): `guest_libc_internal_locale_state` 3/3. Earlier runs: Coordinator final verification at `17437fc05514104ea1114ad13a1793a6eb196e37`: focused rebuild (`nice -n 19`, `--parallel 7`), three repeated locale-state runs including two concurrent swap/consumer threads (300 iterations each), and the 13-test neighbor suite all passed. Conventions/header audit/diff checks passed. Clean merge-tree against upstream/main `9dcf9837ff7b7d51cdfa9057b0ad5ed2ac0fd651`; fresh names scan examined all 1689 open PRs with no competing implementation. - Linux (Ubuntu, GCC 15.2.0, Ninja, Release): `guest_libc_internal_locale_state` (`3/3` consecutive runs passed, `0.01 s` each), covering `_LocimpC2Eb(false/true)` with guard canaries and `_Addfac` heap cleanup, `_LocinfoC1EiPKc` across single and combined category masks (`0..0x3f`) and invalid category/name errors, and `locale::global` transitions (`classic -> A -> B -> B -> classic`) verified through `_Getgloballocale`, `_Init`, `sret` lifetime after caller releases, `num_put<char>` formatting (`"1.5"` / `"1,5"` / `"1;5"`), and negative-input state preservation. - Neighbor and PRX verification (`13/13` passed, `0.24 s`): `patched_libraries` (`libSceLibcInternal.prx` exports `ptwhA0BQVeE`, `zrmR88ClfOs`, `L1Ze94yof2I`), `guest_sce_v2_locale_basics`, `guest_locale`, `guest_rune_locale`, `guest_sce_v2_locale`, `guest_libc_internal_num_get`, `guest_libc_internal_numpunct`, `guest_libc_internal_wide_numpunct`, `guest_libc_internal_time_get`, `guest_time_get_order`, `guest_libc_internal_locale_objects`, `guest_libc_internal_locale_state`, and `guest_libc_internal_time_get_fields`. - Negative controls (`core/libs/prx/libSceLibcInternal/LocaleObjects.cpp`): bypassing global swap in `_ZNSt6locale6globalERKS__nid_postfix` failed `guest_libc_internal_locale_state` (`exit 8`, aborting on `global(A) retains A while caller holds A`); ignoring `category` in `_ZNSt8_LocinfoC1EiPKc_nid_postfix` failed (`exit 8`, aborting on `_LocinfoC1EiPKc rejects invalid category`); byte-exact restore (`sha256` verified) and 3/3 positive re-runs passed. - Static checks: `python3 tools/check_conventions.py --base upstream/main` passed (`All conventions checks passed.`); `python3 core/libs/tests/test_public_headers.py --audit-only` passed (`413 libraries, 34705 exports`); `git diff --check` clean; scratch `debt_fold.py --check` excluding `main`'s pre-existing `fix-libc-wcstombs-zero-capacity.md` duplicate exited `0`. Checked on November 18, 2026: head `41a8dec3df970b72ef15e78e73de75203eca0499` has a clean merge with `main` at `02650d94a5f171dc333d13fc5abed43faf440a1a` and passes `git diff --check`. The current code also validates the facet vector and reads the locale name through the guest string helper. The detailed focused runs above are from the stated historical head. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
PrivacyOnion commented 2026-11-17 13:35:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T13:35:03Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 17437fc055:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_libc_internal_locale_state_tests built cleanly.
  • CTest (guest_libc_internal_locale_state):
    1/1 Test #4192: guest_libc_internal_locale_state ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/InventoryExports6.cpp, core/libs/prx/libSceLibcInternal/LocaleObjects.cpp, core/libs/prx/libSceLibcInternal/TimeGetFields.cpp, core/libs/prx/libSceLibcInternal/include/Api.hpp, core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp, core/libs/prx/libc/include/GuestLocale.hpp, core/libs/prx/libc/src/LocaleSupport.cpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: validated null checks on result, locale, and locale->implementation in _ZNSt6locale6globalERKS__nid_postfix, transparent/name initialization in _ZNSt6locale7_LocimpC2Eb_nid_postfix, and mask bounds 0..0x3f in _ZNSt8_LocinfoC1EiPKc_nid_postfix
    • core/libs/prx/libc/src/LocaleSupport.cpp: verified LibcSwapGlobalLocale_nid_no_patch mutex locking under g_localeInitMutex, atomic retain/release mechanics, exception rollback handling, and setlocale synchronization
    • core/libs/prx/libc/src/LocaleSupport.cpp: checked DestroyLocimp and DeleteLocimp heap ownership, ensuring g_classicFacets is never freed and facet pointer is safely cleared
    • core/libs/prx/libSceLibcInternal/TimeGetFields.cpp & core/libs/prx/libc/src/LocaleSupport.cpp: verified LibcFindGlobalFacet_nid_no_patch holds g_localeInitMutex during global facet array indexing to prevent race conditions during locale swaps
    • docs/dev/debt/changes/feat-libcinternal-locale-state.md & AGENTS.md rules: confirmed technical debt fragment formatting, removal of replaced NotImplemented stubs, absence of unauthorized comments, and conventional commit naming
    • core/libs/tests/GuestLibcInternalLocaleState.cpp: checked comprehensive unit test suite covering single-thread lifecycle, concurrent swap and consume, edge cases, negative validations, and heap verification

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5939429056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-5939429056). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-17T13:35:03Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `17437fc055`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_libc_internal_locale_state_tests` built cleanly. - **CTest** (`guest_libc_internal_locale_state`): ``` 1/1 Test #4192: guest_libc_internal_locale_state ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/InventoryExports6.cpp`, `core/libs/prx/libSceLibcInternal/LocaleObjects.cpp`, `core/libs/prx/libSceLibcInternal/TimeGetFields.cpp`, `core/libs/prx/libSceLibcInternal/include/Api.hpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp`, `core/libs/prx/libc/include/GuestLocale.hpp`, `core/libs/prx/libc/src/LocaleSupport.cpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: validated null checks on result, locale, and locale->implementation in _ZNSt6locale6globalERKS__nid_postfix, transparent/name initialization in _ZNSt6locale7_LocimpC2Eb_nid_postfix, and mask bounds 0..0x3f in _ZNSt8_LocinfoC1EiPKc_nid_postfix - core/libs/prx/libc/src/LocaleSupport.cpp: verified LibcSwapGlobalLocale_nid_no_patch mutex locking under g_localeInitMutex, atomic retain/release mechanics, exception rollback handling, and setlocale synchronization - core/libs/prx/libc/src/LocaleSupport.cpp: checked DestroyLocimp and DeleteLocimp heap ownership, ensuring g_classicFacets is never freed and facet pointer is safely cleared - core/libs/prx/libSceLibcInternal/TimeGetFields.cpp & core/libs/prx/libc/src/LocaleSupport.cpp: verified LibcFindGlobalFacet_nid_no_patch holds g_localeInitMutex during global facet array indexing to prevent race conditions during locale swaps - docs/dev/debt/changes/feat-libcinternal-locale-state.md & AGENTS.md rules: confirmed technical debt fragment formatting, removal of replaced NotImplemented stubs, absence of unauthorized comments, and conventional commit naming - core/libs/tests/GuestLibcInternalLocaleState.cpp: checked comprehensive unit test suite covering single-thread lifecycle, concurrent swap and consume, edge cases, negative validations, and heap verification Looks Good To Me
PrivacyOnion commented 2026-11-19 21:47:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T21:47:41Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 41a8dec3df:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_libc_internal_locale_state_tests built cleanly.
  • CTest (guest_libc_internal_locale_state):
    1/1 Test #4389: guest_libc_internal_locale_state ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/InventoryExports6.cpp, core/libs/prx/libSceLibcInternal/LocaleObjects.cpp, core/libs/prx/libSceLibcInternal/TimeGetFields.cpp, core/libs/prx/libSceLibcInternal/include/Api.hpp, core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp, core/libs/prx/libc/include/GuestLocale.hpp, core/libs/prx/libc/src/LocaleSupport.cpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: verified null checks on result, locale, and locale->implementation in _ZNSt6locale6globalERKS__nid_postfix, transparent/name initialization in _ZNSt6locale7_LocimpC2Eb_nid_postfix, and mask validation (category < 0 || (category & ~0x3fU) != 0) in _ZNSt8_LocinfoC1EiPKc_nid_postfix
    • core/libs/prx/libc/src/LocaleSupport.cpp: verified LibcSwapGlobalLocale_nid_no_patch mutex locking under g_localeInitMutex, atomic retain/release mechanics, setlocale synchronization, and identical pointer retain path
    • core/libs/prx/libc/src/LocaleSupport.cpp: checked DestroyLocimp and DeleteLocimp heap ownership, ensuring g_classicFacets is never freed and facet pointers are safely cleared
    • core/libs/prx/libSceLibcInternal/TimeGetFields.cpp & core/libs/prx/libc/src/LocaleSupport.cpp: confirmed LibcFindGlobalFacet_nid_no_patch holds g_localeInitMutex during global facet array indexing to prevent race conditions during concurrent locale swaps
    • docs/dev/debt/changes/feat-libcinternal-locale-state.md & AGENTS.md rules: confirmed technical debt fragment formatting, removal of replaced stubs, absence of unauthorized comments, and conventional commit naming
    • core/libs/tests/GuestLibcInternalLocaleState.cpp: checked unit test suite covering single-thread lifecycle, concurrent swap and consume, edge cases, negative input validations, and heap verification

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5983938563 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-5983938563). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-19T21:47:41Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `41a8dec3df`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_libc_internal_locale_state_tests` built cleanly. - **CTest** (`guest_libc_internal_locale_state`): ``` 1/1 Test #4389: guest_libc_internal_locale_state ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/InventoryExports6.cpp`, `core/libs/prx/libSceLibcInternal/LocaleObjects.cpp`, `core/libs/prx/libSceLibcInternal/TimeGetFields.cpp`, `core/libs/prx/libSceLibcInternal/include/Api.hpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp`, `core/libs/prx/libc/include/GuestLocale.hpp`, `core/libs/prx/libc/src/LocaleSupport.cpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: verified null checks on result, locale, and locale->implementation in _ZNSt6locale6globalERKS__nid_postfix, transparent/name initialization in _ZNSt6locale7_LocimpC2Eb_nid_postfix, and mask validation (category < 0 || (category & ~0x3fU) != 0) in _ZNSt8_LocinfoC1EiPKc_nid_postfix - core/libs/prx/libc/src/LocaleSupport.cpp: verified LibcSwapGlobalLocale_nid_no_patch mutex locking under g_localeInitMutex, atomic retain/release mechanics, setlocale synchronization, and identical pointer retain path - core/libs/prx/libc/src/LocaleSupport.cpp: checked DestroyLocimp and DeleteLocimp heap ownership, ensuring g_classicFacets is never freed and facet pointers are safely cleared - core/libs/prx/libSceLibcInternal/TimeGetFields.cpp & core/libs/prx/libc/src/LocaleSupport.cpp: confirmed LibcFindGlobalFacet_nid_no_patch holds g_localeInitMutex during global facet array indexing to prevent race conditions during concurrent locale swaps - docs/dev/debt/changes/feat-libcinternal-locale-state.md & AGENTS.md rules: confirmed technical debt fragment formatting, removal of replaced stubs, absence of unauthorized comments, and conventional commit naming - core/libs/tests/GuestLibcInternalLocaleState.cpp: checked unit test suite covering single-thread lifecycle, concurrent swap and consume, edge cases, negative input validations, and heap verification Looks Good To Me
MarcZX10 commented 2026-11-19 21:55:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T21:55:37Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head 41a8dec3df970b72ef15e78e73de75203eca0499 using the prepared diff and pinned repository reader (repo_read.py). No commands or tests were run. The description reports historical Linux tests at a prior head; those results were not independently verified here.

Results

Check Result Note
Prepared diff and changed files passed All 10 changed files included
Targeted lifecycle and consumer code passed Read at the pinned head
Tests and build not run Description reports runs at an earlier head

Findings

Blocking

None.

Non-blocking

  • LibcFindGlobalFacet_nid_no_patch protects the facet-vector lookup with the mutex, then returns a borrowed facet pointer. A concurrent global-locale swap can release the old implementation and free its facet vector after the lock is released, while the consumer still uses that facet (core/libs/prx/libc/src/LocaleSupport.cpp:2063). The debt note documents this lifetime limitation. Consider retaining the selected facet or otherwise extending the locale lifetime across use.

Not verified

No build, tests, or console behavior were run. The description’s test claims concern historical head 17437fc05514104ea1114ad13a1793a6eb196e37, not the reviewed head. All changed files listed in the manifest were included; the prepared diff excludes lockfiles, minified files, dist/, build/, and .svg files by rule. No additional excluded changed files were listed.

To get this to a good state

Nothing is required. Optional: extend ownership of the borrowed facet pointer across its use during concurrent locale swaps.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5984034317 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-5984034317). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T21:55:37Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `41a8dec3df970b72ef15e78e73de75203eca0499` using the prepared diff and pinned repository reader (`repo_read.py`). No commands or tests were run. The description reports historical Linux tests at a prior head; those results were not independently verified here. ## Results | Check | Result | Note | |---|---|---| | Prepared diff and changed files | passed | All 10 changed files included | | Targeted lifecycle and consumer code | passed | Read at the pinned head | | Tests and build | not run | Description reports runs at an earlier head | ## Findings ### Blocking None. ### Non-blocking - `LibcFindGlobalFacet_nid_no_patch` protects the facet-vector lookup with the mutex, then returns a borrowed facet pointer. A concurrent global-locale swap can release the old implementation and free its facet vector after the lock is released, while the consumer still uses that facet (`core/libs/prx/libc/src/LocaleSupport.cpp:2063`). The debt note documents this lifetime limitation. Consider retaining the selected facet or otherwise extending the locale lifetime across use. ## Not verified No build, tests, or console behavior were run. The description’s test claims concern historical head `17437fc05514104ea1114ad13a1793a6eb196e37`, not the reviewed head. All changed files listed in the manifest were included; the prepared diff excludes lockfiles, minified files, `dist/`, `build/`, and `.svg` files by rule. No additional excluded changed files were listed. ## To get this to a good state Nothing is required. Optional: extend ownership of the borrowed facet pointer across its use during concurrent locale swaps.
PrivacyOnion commented 2026-11-22 04:14:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-22T04:14:31Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against f2de27a74e:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_libc_internal_locale_state_tests built cleanly.
  • CTest (guest_libc_internal_locale_state):
    1/1 Test #4536: guest_libc_internal_locale_state ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/InventoryExports6.cpp, core/libs/prx/libSceLibcInternal/LocaleObjects.cpp, core/libs/prx/libSceLibcInternal/TimeGetFields.cpp, core/libs/prx/libSceLibcInternal/include/Api.hpp, core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp, core/libs/prx/libc/include/GuestLocale.hpp, core/libs/prx/libc/src/LocaleSupport.cpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Validated pointer safety and argument validation in core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: result, locale, and locale->implementation null-checks in ZNSt6locale6globalERKS, self null check in _LocimpC2Eb, and self and category range validation (category < 0 || (category & ~0x3fU) != 0) in _LocinfoC1EiPKc
    • Checked synchronization and concurrency in core/libs/prx/libc/src/LocaleSupport.cpp: LibcSwapGlobalLocale_nid_no_patch protects global locale pointer mutation and reference retention under g_localeInitMutex; LibcFindGlobalFacet_nid_no_patch acquires g_localeInitMutex and checks bounds and null pointers
    • Verified memory ownership and destruction in core/libs/prx/libc/src/LocaleSupport.cpp: DestroyLocimp frees implementation->facets via ApplicationHeapFree_nid_no_patch while protecting g_classicFacets, and DeleteLocimp disposes of the object via _ZdlPv_nid_postfix
    • Examined AGENTS.md conventions: verified no unauthorized comments exist in changed source code, debt fragments are correctly added under docs/dev/debt/changes/feat-libcinternal-locale-state.md, and unimplemented stubs were removed cleanly from InventoryExports6.cpp
    • Verified unit test coverage in core/libs/tests/GuestLibcInternalLocaleState.cpp covering lifecycle, memory tracking without leaks or double frees, concurrent global swap and formatting, and negative inputs

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6010269304 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-6010269304). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-22T04:14:31Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `f2de27a74e`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_libc_internal_locale_state_tests` built cleanly. - **CTest** (`guest_libc_internal_locale_state`): ``` 1/1 Test #4536: guest_libc_internal_locale_state ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/InventoryExports6.cpp`, `core/libs/prx/libSceLibcInternal/LocaleObjects.cpp`, `core/libs/prx/libSceLibcInternal/TimeGetFields.cpp`, `core/libs/prx/libSceLibcInternal/include/Api.hpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp`, `core/libs/prx/libc/include/GuestLocale.hpp`, `core/libs/prx/libc/src/LocaleSupport.cpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Validated pointer safety and argument validation in core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: result, locale, and locale->implementation null-checks in _ZNSt6locale6globalERKS_, self null check in _LocimpC2Eb, and self and category range validation (category < 0 || (category & ~0x3fU) != 0) in _LocinfoC1EiPKc - Checked synchronization and concurrency in core/libs/prx/libc/src/LocaleSupport.cpp: LibcSwapGlobalLocale_nid_no_patch protects global locale pointer mutation and reference retention under g_localeInitMutex; LibcFindGlobalFacet_nid_no_patch acquires g_localeInitMutex and checks bounds and null pointers - Verified memory ownership and destruction in core/libs/prx/libc/src/LocaleSupport.cpp: DestroyLocimp frees implementation->facets via ApplicationHeapFree_nid_no_patch while protecting g_classicFacets, and DeleteLocimp disposes of the object via _ZdlPv_nid_postfix - Examined AGENTS.md conventions: verified no unauthorized comments exist in changed source code, debt fragments are correctly added under docs/dev/debt/changes/feat-libcinternal-locale-state.md, and unimplemented stubs were removed cleanly from InventoryExports6.cpp - Verified unit test coverage in core/libs/tests/GuestLibcInternalLocaleState.cpp covering lifecycle, memory tracking without leaks or double frees, concurrent global swap and formatting, and negative inputs Looks Good To Me
MarcZX10 commented 2026-11-22 05:54:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T05:54:33Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: ensure a locale and its facets remain alive for the full duration of concurrent reads during global locale swaps.

What I ran

Reviewed head f2de27a74e1ea4682ee88c3fce1e3fb7971b1dd0 from the prepared diff and repository reader. No commands or tests were run.

Results

Check Result Note
Diff and changed code passed Reviewed relevant implementation and callers
Tests not run Only author-reported results are available

Findings

Blocking

  • core/libs/prx/libc/src/LocaleSupport.cpp:255 returns a borrowed facet pointer after releasing g_localeInitMutex. A concurrent swap can release and destroy the previous locale, freeing its facet vector while the caller is still using the returned facet. The changed NumGet.cpp fallback still reads global locale state without this helper, and the existing consumers use the facet after lookup. Protect the locale and facet lifetime through consumption, or retain the relevant locale/facet before releasing the lock. The swap path must also correctly transfer or release the old global reference; the current changed logic retains the incoming locale but returns the outgoing locale without releasing the global ownership reference.

Non-blocking

None.

Not verified

No tests were run, and the claimed build and focused runs were reported by the author/coordinator rather than performed in this review. The full text of all nine changed files was included in the review bundle; targeted reads were made of the changed locale implementation, its facet consumers, and lifecycle test. Other changed-file context was not read. Excluded files: none were listed in the manifest.

To get this to a good state

Make global locale replacement and concurrent facet consumption preserve ownership for the full read, then rerun the locale-state and neighbor tests on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6010618845 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-6010618845). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T05:54:33Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: ensure a locale and its facets remain alive for the full duration of concurrent reads during global locale swaps. ## What I ran Reviewed head `f2de27a74e1ea4682ee88c3fce1e3fb7971b1dd0` from the prepared diff and repository reader. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code | passed | Reviewed relevant implementation and callers | | Tests | not run | Only author-reported results are available | ## Findings ### Blocking - `core/libs/prx/libc/src/LocaleSupport.cpp:255` returns a borrowed facet pointer after releasing `g_localeInitMutex`. A concurrent swap can release and destroy the previous locale, freeing its facet vector while the caller is still using the returned facet. The changed `NumGet.cpp` fallback still reads global locale state without this helper, and the existing consumers use the facet after lookup. Protect the locale and facet lifetime through consumption, or retain the relevant locale/facet before releasing the lock. The swap path must also correctly transfer or release the old global reference; the current changed logic retains the incoming locale but returns the outgoing locale without releasing the global ownership reference. ### Non-blocking None. ## Not verified No tests were run, and the claimed build and focused runs were reported by the author/coordinator rather than performed in this review. The full text of all nine changed files was included in the review bundle; targeted reads were made of the changed locale implementation, its facet consumers, and lifecycle test. Other changed-file context was not read. Excluded files: none were listed in the manifest. ## To get this to a good state Make global locale replacement and concurrent facet consumption preserve ownership for the full read, then rerun the locale-state and neighbor tests on the updated head.
MarcZX10 commented 2026-11-22 13:13:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T13:13:43Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head c4c91b1c380c12584757871e44166e3aeae85d95 using repo_read.py. I did not run commands or tests; the test results below are author-reported. I read the prepared description, commits, manifest, and diff, then targeted source ranges for the lifecycle implementation and its consumers.

Results

Check Result Note
Source review passed Lifecycle and consumer paths inspected
Tests not run Reported results are from the author
Console behavior not run Console binary behavior remains unverified

Findings

Blocking

None.

Non-blocking

  • locale::global validates and applies a named locale with setlocale before acquiring the mutex and swapping the global locale (core/libs/prx/libc/src/LocaleSupport.cpp:2112). Concurrent calls can therefore interleave their C locale changes with a different global-locale swap. Consider moving locale validation/application into the same critical section or otherwise synchronizing it with swaps. This is not confirmed as a defect for the supported C locale, but merits attention if support expands.

Not verified

The console _Locimp vtable and ownership behavior were not checked against console binary disassembly, as recorded in the change description. I did not run the reported Linux or Windows tests, negative controls, or build checks. files.json was not available through the reader, so the excluded-file list could not be checked. All 11 changed paths in the manifest are marked included; I read the full changed contents for LocaleObjects.cpp, GuestLocale.hpp, GuestLibcInternalLocaleState.cpp, and the debt note, plus relevant ranges of CMakeLists.txt, NumGet.cpp, TimeGetFields.cpp, and LocaleSupport.cpp. I reviewed the diff for InventoryExports6.cpp, Api.hpp, and InventoryExports6.hpp but did not read their full head contents.

To get this to a good state

Nothing is required. Optional: synchronize locale validation/application with the global swap if named locale support is extended beyond C.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012437264 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-6012437264). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T13:13:43Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Reviewed head `c4c91b1c380c12584757871e44166e3aeae85d95` using `repo_read.py`. I did not run commands or tests; the test results below are author-reported. I read the prepared description, commits, manifest, and diff, then targeted source ranges for the lifecycle implementation and its consumers. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Lifecycle and consumer paths inspected | | Tests | not run | Reported results are from the author | | Console behavior | not run | Console binary behavior remains unverified | ## Findings ### Blocking None. ### Non-blocking - `locale::global` validates and applies a named locale with `setlocale` before acquiring the mutex and swapping the global locale (`core/libs/prx/libc/src/LocaleSupport.cpp:2112`). Concurrent calls can therefore interleave their C locale changes with a different global-locale swap. Consider moving locale validation/application into the same critical section or otherwise synchronizing it with swaps. This is not confirmed as a defect for the supported `C` locale, but merits attention if support expands. ## Not verified The console `_Locimp` vtable and ownership behavior were not checked against console binary disassembly, as recorded in the change description. I did not run the reported Linux or Windows tests, negative controls, or build checks. `files.json` was not available through the reader, so the excluded-file list could not be checked. All 11 changed paths in the manifest are marked included; I read the full changed contents for `LocaleObjects.cpp`, `GuestLocale.hpp`, `GuestLibcInternalLocaleState.cpp`, and the debt note, plus relevant ranges of `CMakeLists.txt`, `NumGet.cpp`, `TimeGetFields.cpp`, and `LocaleSupport.cpp`. I reviewed the diff for `InventoryExports6.cpp`, `Api.hpp`, and `InventoryExports6.hpp` but did not read their full head contents. ## To get this to a good state Nothing is required. Optional: synchronize locale validation/application with the global swap if named locale support is extended beyond `C`.
PrivacyOnion commented 2026-11-22 13:14:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-22T13:14:15Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against c4c91b1c38:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_libc_internal_locale_state_tests built cleanly.
  • CTest (guest_libc_internal_locale_state):
    1/1 Test #4546: guest_libc_internal_locale_state ...   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/InventoryExports6.cpp, core/libs/prx/libSceLibcInternal/LocaleObjects.cpp, core/libs/prx/libSceLibcInternal/NumGet.cpp, core/libs/prx/libSceLibcInternal/TimeGetFields.cpp, core/libs/prx/libSceLibcInternal/include/Api.hpp, core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp, core/libs/prx/libc/include/GuestLocale.hpp, core/libs/prx/libc/src/LocaleSupport.cpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified pointer and argument validation in core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: ZNSt6locale6globalERKS validates result, locale, and locale->implementation; _LocimpC2Eb validates self; _LocinfoC1EiPKc validates self and category bitmask (category < 0 || (category & ~0x3fU) != 0).
    • Checked reference counting and lifecycle semantics in LibcSwapGlobalLocale_nid_no_patch and LibcReleaseLocale_nid_no_patch in core/libs/prx/libc/src/LocaleSupport.cpp: outgoing global reference is moved to the caller-returned locale facade, incoming locale is retained under g_localeInitMutex, and self-swap retains an extra reference matching caller-side facade ownership.
    • Audited concurrency and facet lifetime handling via GuestLocale::GlobalLocaleHold across StreamNumpunct, Widen, NumPutBool, PutInteger, PutFloating, and TimeGet/NumGet consumers, ensuring global _Locimp is retained under g_localeInitMutex for the full duration of facet reads.
    • Verified _ZNSt6locale5_InitEv and _ZNSt6locale16_GetgloballocaleEv in core/libs/prx/libc/src/LocaleSupport.cpp correctly read g_globalLocale.load() instead of hardcoding g_classicLocale.
    • Confirmed technical debt documentation in docs/dev/debt/changes/feat-libcinternal-locale-state.md accurately reflects the unversioned _Locimp vtable, transparent fallback, and unversioned exports.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012439129 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-6012439129). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-22T13:14:15Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `c4c91b1c38`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_libc_internal_locale_state_tests` built cleanly. - **CTest** (`guest_libc_internal_locale_state`): ``` 1/1 Test #4546: guest_libc_internal_locale_state ... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/InventoryExports6.cpp`, `core/libs/prx/libSceLibcInternal/LocaleObjects.cpp`, `core/libs/prx/libSceLibcInternal/NumGet.cpp`, `core/libs/prx/libSceLibcInternal/TimeGetFields.cpp`, `core/libs/prx/libSceLibcInternal/include/Api.hpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp`, `core/libs/prx/libc/include/GuestLocale.hpp`, `core/libs/prx/libc/src/LocaleSupport.cpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified pointer and argument validation in core/libs/prx/libSceLibcInternal/LocaleObjects.cpp: _ZNSt6locale6globalERKS_ validates result, locale, and locale->implementation; _LocimpC2Eb validates self; _LocinfoC1EiPKc validates self and category bitmask (category < 0 || (category & ~0x3fU) != 0). - Checked reference counting and lifecycle semantics in LibcSwapGlobalLocale_nid_no_patch and LibcReleaseLocale_nid_no_patch in core/libs/prx/libc/src/LocaleSupport.cpp: outgoing global reference is moved to the caller-returned locale facade, incoming locale is retained under g_localeInitMutex, and self-swap retains an extra reference matching caller-side facade ownership. - Audited concurrency and facet lifetime handling via GuestLocale::GlobalLocaleHold across StreamNumpunct, Widen, NumPutBool, PutInteger, PutFloating, and TimeGet/NumGet consumers, ensuring global _Locimp is retained under g_localeInitMutex for the full duration of facet reads. - Verified _ZNSt6locale5_InitEv and _ZNSt6locale16_GetgloballocaleEv in core/libs/prx/libc/src/LocaleSupport.cpp correctly read g_globalLocale.load() instead of hardcoding g_classicLocale. - Confirmed technical debt documentation in docs/dev/debt/changes/feat-libcinternal-locale-state.md accurately reflects the unversioned _Locimp vtable, transparent fallback, and unversioned exports. Looks Good To Me
MarcZX10 commented 2026-11-25 00:27:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T00:27:00Z.

Review: COMMENTED


Reviewed — comments

The review covers head 04ddb983b2ff0685b5fc964f9c0667a014f362cf; no verified blocking defect was found, but I did not run the reported checks or independently verify console ABI behavior, so a formal approval is not justified.

What I ran

Read the prepared diff and changed files using repo_read.py at the pinned head. I ran no build, tests, or other programmatic checks. The test results in the PR description are author-reported and refer to earlier revisions.

Results

Check Result Note
Diff and changed code review passed All 11 changed files read
Build and tests not run Results are author-reported
Console ABI behavior not run Debt note records this limit

Findings

Blocking

None.

Non-blocking

  • The new _Locimp vtable and facet-vector ownership behavior are based on Microsoft STL and the project's modeled ABI; the PR notes they were not verified against console disassembly. Verify this against the console implementation when that evidence is available.

Not verified

  • Build, test suite, negative controls, convention checks, public-header audit, and diff checks were not run in this review. The PR description reports checks at earlier heads, so they do not establish results for this exact head.
  • Console libSceLibcInternal.sprx behavior and ABI were not independently confirmed.
  • All changed files listed in the manifest were read: core/libs/prx/libSceLibcInternal/CMakeLists.txt, core/libs/prx/libSceLibcInternal/InventoryExports6.cpp, core/libs/prx/libSceLibcInternal/LocaleObjects.cpp, core/libs/prx/libSceLibcInternal/NumGet.cpp, core/libs/prx/libSceLibcInternal/TimeGetFields.cpp, core/libs/prx/libSceLibcInternal/include/Api.hpp, core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp, core/libs/prx/libc/include/GuestLocale.hpp, core/libs/prx/libc/src/LocaleSupport.cpp, core/libs/tests/GuestLibcInternalLocaleState.cpp, and docs/dev/debt/changes/feat-libcinternal-locale-state.md. The manifest lists all 11 as included; none were excluded.

To get this to a good state

Nothing is required. Optional: verify the modeled _Locimp ABI and ownership against console disassembly when available.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6049651967 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22370#pullrequestreview-6049651967). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T00:27:00Z. **Review:** COMMENTED --- # Reviewed — comments The review covers head `04ddb983b2ff0685b5fc964f9c0667a014f362cf`; no verified blocking defect was found, but I did not run the reported checks or independently verify console ABI behavior, so a formal approval is not justified. ## What I ran Read the prepared diff and changed files using `repo_read.py` at the pinned head. I ran no build, tests, or other programmatic checks. The test results in the PR description are author-reported and refer to earlier revisions. ## Results | Check | Result | Note | |---|---|---| | Diff and changed code review | passed | All 11 changed files read | | Build and tests | not run | Results are author-reported | | Console ABI behavior | not run | Debt note records this limit | ## Findings ### Blocking None. ### Non-blocking - The new `_Locimp` vtable and facet-vector ownership behavior are based on Microsoft STL and the project's modeled ABI; the PR notes they were not verified against console disassembly. Verify this against the console implementation when that evidence is available. ## Not verified - Build, test suite, negative controls, convention checks, public-header audit, and diff checks were not run in this review. The PR description reports checks at earlier heads, so they do not establish results for this exact head. - Console `libSceLibcInternal.sprx` behavior and ABI were not independently confirmed. - All changed files listed in the manifest were read: `core/libs/prx/libSceLibcInternal/CMakeLists.txt`, `core/libs/prx/libSceLibcInternal/InventoryExports6.cpp`, `core/libs/prx/libSceLibcInternal/LocaleObjects.cpp`, `core/libs/prx/libSceLibcInternal/NumGet.cpp`, `core/libs/prx/libSceLibcInternal/TimeGetFields.cpp`, `core/libs/prx/libSceLibcInternal/include/Api.hpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports6.hpp`, `core/libs/prx/libc/include/GuestLocale.hpp`, `core/libs/prx/libc/src/LocaleSupport.cpp`, `core/libs/tests/GuestLibcInternalLocaleState.cpp`, and `docs/dev/debt/changes/feat-libcinternal-locale-state.md`. The manifest lists all 11 as included; none were excluded. ## To get this to a good state Nothing is required. Optional: verify the modeled `_Locimp` ABI and ownership against console disassembly when available.
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!22370
No description provided.