feat(libSceLibcInternal): implement time-get date-order metadata #19609

Merged
fogydes merged 1 commit from upstream-pr/19609 into main 2026-11-16 20:32:36 +00:00
fogydes commented 2026-11-13 15:50:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-11-13T15:50:55Z.


What

Implement the two unversioned time_get/time_get<wchar_t> do_date_order exports that previously threw. Both return the caller facet's stored 32-bit date-order field at offset 0x28 unchanged. They do not read another field or vtable, construct a locale/facet, or substitute a fixed order. Existing public date_order wrappers retain their own dispatch.

Clean-room source: readable libc.prx, SDK 10.00, char getter at 0x99310 and wchar getter at 0xaaa20. SDK target/include/xloctime:18-20 defines dateorder, :218-221 returns _Dateorder, and :643 declares the field. Both exact names match the pinned NIDs 8PIh8BFpNYQ and dP14OHWe4nI. No reference binaries/extracts are attached or linked; no console measurement is claimed.

Unusable or overflowing facet addresses throw as documented host-safety behavior. Normal calls preserve memory and errno. Console/later-version equivalence and full facet construction remain unverified.

Measured coverage: 424 -> 426 implemented, 706 -> 704 TODO, 1,130 total. The two NIDs already had throwing aliases, so selected presence remains 0 missing / 2 provided / 0 unknown.

Rebased onto main cacaa4a5ecb on 2026-11-14, preserving the merged CodecvtUtfMetadata umbrella declaration. Getter and test implementation bytes are unchanged. The refreshed full-runtime build and both focused Windows CTests passed again; public headers 413 libraries / 34,550 exports and current conventions passed.

Original measurement baseline: main snapshot 228330220b. Required pr_overlap.py inspected 1,526 open heads / 24 candidates and exited 2 against later main a9ef084484. All nine reported heads were manually checked: no competing getter implementation or behavioral dependency. #13782/#19434/#19593 insert independent FloatWords/Forwards/CodecvtUtfMetadata umbrella headers; preserve both headers when merging. Six stale whole-branch comparisons remain unverified. Guest-copy/type providers are unchanged across main drift; incidental heap/math/run-report/socket changes are not called by these getters.

Tested

  • Windows x64 WinLibs MinGW/GCC 15.2 Release, full runtime configuration: affected libc/libkernel/libSceLibcInternal and focused targets built on D. The two time_get_order/libc_internal_time_get CTests passed 2/2 on final head 4aa12e52102e.
  • Tests cover enums 0..4, negative/high 32-bit patterns, distinct/unaligned facets, readonly fields, exact four-byte reads at guarded boundaries, invalid/overflow addresses, unchanged memory and errno.
  • Public headers: 413 libraries / 34,520 exports passed. Both NIDs were verified in a freshly patched PE copy using repository nid_patcher.
  • Final conventions and git diff checks passed. The automated overlap limitations are disclosed above.
  • No Linux, console/commercial-title, GPU or performance claim.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

The refreshed overlap scan inspected 1,565 open PRs and again exited 2 on stale comparisons. All nine listed heads were checked; no competing getter implementation. The listed #19609 is this same PR's pre-rebase head; #19602 contains an independent mutex/header addition. The remaining heads change other functions and still need their own rebases.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5298547617 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19609). Originally posted by [fogydes](https://github.com/fogydes) on 2026-11-13T15:50:55Z. --- ### What Implement the two unversioned time_get<char>/time_get<wchar_t> do_date_order exports that previously threw. Both return the caller facet's stored 32-bit date-order field at offset 0x28 unchanged. They do not read another field or vtable, construct a locale/facet, or substitute a fixed order. Existing public date_order wrappers retain their own dispatch. Clean-room source: readable libc.prx, SDK 10.00, char getter at 0x99310 and wchar getter at 0xaaa20. SDK target/include/xloctime:18-20 defines dateorder, :218-221 returns _Dateorder, and :643 declares the field. Both exact names match the pinned NIDs 8PIh8BFpNYQ and dP14OHWe4nI. No reference binaries/extracts are attached or linked; no console measurement is claimed. Unusable or overflowing facet addresses throw as documented host-safety behavior. Normal calls preserve memory and errno. Console/later-version equivalence and full facet construction remain unverified. Measured coverage: **424 -> 426 implemented**, **706 -> 704 TODO**, **1,130 total**. The two NIDs already had throwing aliases, so selected presence remains **0 missing / 2 provided / 0 unknown**. Rebased onto main `cacaa4a5ecb` on 2026-11-14, preserving the merged CodecvtUtfMetadata umbrella declaration. Getter and test implementation bytes are unchanged. The refreshed full-runtime build and both focused Windows CTests passed again; public headers 413 libraries / 34,550 exports and current conventions passed. Original measurement baseline: main snapshot 228330220ba. Required pr_overlap.py inspected 1,526 open heads / 24 candidates and exited 2 against later main a9ef084484fa. All nine reported heads were manually checked: no competing getter implementation or behavioral dependency. #13782/#19434/#19593 insert independent FloatWords/Forwards/CodecvtUtfMetadata umbrella headers; preserve both headers when merging. Six stale whole-branch comparisons remain unverified. Guest-copy/type providers are unchanged across main drift; incidental heap/math/run-report/socket changes are not called by these getters. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - Windows x64 WinLibs MinGW/GCC 15.2 Release, full runtime configuration: affected libc/libkernel/libSceLibcInternal and focused targets built on D. The two time_get_order/libc_internal_time_get CTests passed **2/2** on final head 4aa12e52102e. - Tests cover enums 0..4, negative/high 32-bit patterns, distinct/unaligned facets, readonly fields, exact four-byte reads at guarded boundaries, invalid/overflow addresses, unchanged memory and errno. - Public headers: **413 libraries / 34,520 exports** passed. Both NIDs were verified in a freshly patched PE copy using repository nid_patcher. - Final conventions and git diff checks passed. The automated overlap limitations are disclosed above. - No Linux, console/commercial-title, GPU or performance claim. ### 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: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes The refreshed overlap scan inspected 1,565 open PRs and again exited 2 on stale comparisons. All nine listed heads were checked; no competing getter implementation. The listed #19609 is this same PR's pre-rebase head; #19602 contains an independent mutex/header addition. The remaining heads change other functions and still need their own rebases.
PrivacyOnion commented 2026-11-13 17:36:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-13T17:36:35Z.

Review: CHANGES_REQUESTED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_time_get_order_tests built cleanly.
  • CTest (guest_time_get_order):
    1/1 Test #3648: guest_time_get_order .............   Passed    0.02 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: the tests still pass with the change reverted, so they do not cover it
  • Code reading:
    • core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp: verified that ReadDateOrder_nid_no_patch prevents address overflow (address > std::numeric_limitsstd::uintptr_t::max() - DateOrderOffset), safely reads the 4-byte date order at offset 0x28 using GuestCopyIn_nid_no_patch, preserves caller errno, and throws std::invalid_argument defensively on unreadable or overflowing facet addresses.
    • core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp and core/libs/prx/libSceLibcInternal/include/TimeGetOrder.hpp: verified that both exports (_ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE13do_date_orderEv_nid_postfix and _ZNKSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE13do_date_orderEv_nid_postfix) match the exact PS5 Itanium ABI mangled symbol names and std::int32_t APS5_VABI (const void*) signatures.
    • core/libs/prx/libSceLibcInternal/Export.cpp: verified that the obsolete throwing pending stubs sceLibcInternalPending4_040_nid_no_patch (NID 8PIh8BFpNYQ) and sceLibcInternalPending4_056_nid_no_patch (NID dP14OHWe4nI) were cleanly removed without leaving orphaned aliases or duplicated symbols.
    • core/libs/tests/GuestTimeGetOrder.cpp: verified comprehensive test coverage for char and wchar_t getters across dateorder enum values 0..4, 32-bit boundary bit patterns, unaligned facets (offset 1), caller buffer immutability, errno preservation (errno == 71), read-only memory, exact 4-byte reads against guard pages, and defensive exception handling for nullptr, 0x10, and overflowing addresses.
    • docs/dev/debt/libSceLibcInternal.md and repository rules: verified strict AGENTS.md compliance with zero comments in code, correct technical debt documentation for unimplemented facet construction and defensive host-safety exception behavior, and proper test registration in CMakeLists.txt with configure_windows_unwind and Windows environment settings.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5895469004 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19609#pullrequestreview-5895469004). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-13T17:36:35Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `4aa12e5210`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_time_get_order_tests` built cleanly. - **CTest** (`guest_time_get_order`): ``` 1/1 Test #3648: guest_time_get_order ............. Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: the tests still pass with the change reverted, so they do not cover it - **Code reading**: - core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp: verified that ReadDateOrder_nid_no_patch prevents address overflow (address > std::numeric_limits<std::uintptr_t>::max() - DateOrderOffset), safely reads the 4-byte date order at offset 0x28 using GuestCopyIn_nid_no_patch, preserves caller errno, and throws std::invalid_argument defensively on unreadable or overflowing facet addresses. - core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp and core/libs/prx/libSceLibcInternal/include/TimeGetOrder.hpp: verified that both exports (_ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE13do_date_orderEv_nid_postfix and _ZNKSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE13do_date_orderEv_nid_postfix) match the exact PS5 Itanium ABI mangled symbol names and std::int32_t APS5_VABI (const void*) signatures. - core/libs/prx/libSceLibcInternal/Export.cpp: verified that the obsolete throwing pending stubs sceLibcInternalPending4_040_nid_no_patch (NID 8PIh8BFpNYQ) and sceLibcInternalPending4_056_nid_no_patch (NID dP14OHWe4nI) were cleanly removed without leaving orphaned aliases or duplicated symbols. - core/libs/tests/GuestTimeGetOrder.cpp: verified comprehensive test coverage for char and wchar_t getters across dateorder enum values 0..4, 32-bit boundary bit patterns, unaligned facets (offset 1), caller buffer immutability, errno preservation (errno == 71), read-only memory, exact 4-byte reads against guard pages, and defensive exception handling for nullptr, 0x10, and overflowing addresses. - docs/dev/debt/libSceLibcInternal.md and repository rules: verified strict AGENTS.md compliance with zero comments in code, correct technical debt documentation for unimplemented facet construction and defensive host-safety exception behavior, and proper test registration in CMakeLists.txt with configure_windows_unwind and Windows environment settings. Requesting changes for the points above.
PrivacyOnion commented 2026-11-14 08:54:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T08:54:35Z.

Review: CHANGES_REQUESTED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_time_get_order_tests built cleanly.
  • CTest (guest_time_get_order):
    1/1 Test #3702: guest_time_get_order .............   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: the tests still pass with the change reverted, so they do not cover it
  • Code reading:
    • Verified in core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp that DateOrderOffset (0x28) matches the PS5 SDK 10.00 _Dateorder member offset in both time_get and time_get<wchar_t>, and that ReadDateOrder_nid_no_patch checks for pointer overflow (address > max - DateOrderOffset) and uses GuestCopyIn_nid_no_patch to safely copy sizeof(int32_t) bytes without host crash risks.
    • Verified in core/libs/prx/libSceLibcInternal/include/TimeGetOrder.hpp and TimeGetOrder.cpp that both _ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE13do_date_orderEv_nid_postfix and _ZNKSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE13do_date_orderEv_nid_postfix match NIDs 8PIh8BFpNYQ and dP14OHWe4nI, use APS5_VABI in extern "C", return std::int32_t, and accept const void* self.
    • Verified in TimeGetOrder.cpp that guest errno is saved and restored around GuestCopyIn_nid_no_patch, guaranteeing that neither successful reads nor defensive std::invalid_argument throws corrupt guest errno.
    • Verified strict AGENTS.md compliance: zero comments in TimeGetOrder.cpp, TimeGetOrder.hpp, and GuestTimeGetOrder.cpp, clean removal of throwing stubs from Export.cpp, and complete technical debt documentation in docs/dev/debt/libSceLibcInternal.md.
    • Verified comprehensive test coverage in core/libs/tests/GuestTimeGetOrder.cpp: validates both char and wchar_t queries over full 32-bit test vectors (0..4, negative numbers, extreme bit patterns), unaligned facet buffers, read-only memory, multi-instance isolation, guard-page fault boundaries via mprotect/VirtualProtect, and invalid/overflow addresses (nullptr, 0x10, max - 0x10).
    • Verified build and test integration in core/libs/prx/libSceLibcInternal/CMakeLists.txt: TimeGetOrder.cpp is linked into libSceLibcInternal, guest_time_get_order_tests is configured with unwind handling and 20s timeout, and Windows PATH environment modification is correctly set.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5903297773 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19609#pullrequestreview-5903297773). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-14T08:54:35Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `e8f55eb969`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_time_get_order_tests` built cleanly. - **CTest** (`guest_time_get_order`): ``` 1/1 Test #3702: guest_time_get_order ............. Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: the tests still pass with the change reverted, so they do not cover it - **Code reading**: - Verified in core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp that DateOrderOffset (0x28) matches the PS5 SDK 10.00 _Dateorder member offset in both time_get<char> and time_get<wchar_t>, and that ReadDateOrder_nid_no_patch checks for pointer overflow (address > max - DateOrderOffset) and uses GuestCopyIn_nid_no_patch to safely copy sizeof(int32_t) bytes without host crash risks. - Verified in core/libs/prx/libSceLibcInternal/include/TimeGetOrder.hpp and TimeGetOrder.cpp that both _ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE13do_date_orderEv_nid_postfix and _ZNKSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE13do_date_orderEv_nid_postfix match NIDs 8PIh8BFpNYQ and dP14OHWe4nI, use APS5_VABI in extern "C", return std::int32_t, and accept const void* self. - Verified in TimeGetOrder.cpp that guest errno is saved and restored around GuestCopyIn_nid_no_patch, guaranteeing that neither successful reads nor defensive std::invalid_argument throws corrupt guest errno. - Verified strict AGENTS.md compliance: zero comments in TimeGetOrder.cpp, TimeGetOrder.hpp, and GuestTimeGetOrder.cpp, clean removal of throwing stubs from Export.cpp, and complete technical debt documentation in docs/dev/debt/libSceLibcInternal.md. - Verified comprehensive test coverage in core/libs/tests/GuestTimeGetOrder.cpp: validates both char and wchar_t queries over full 32-bit test vectors (0..4, negative numbers, extreme bit patterns), unaligned facet buffers, read-only memory, multi-instance isolation, guard-page fault boundaries via mprotect/VirtualProtect, and invalid/overflow addresses (nullptr, 0x10, max - 0x10). - Verified build and test integration in core/libs/prx/libSceLibcInternal/CMakeLists.txt: TimeGetOrder.cpp is linked into libSceLibcInternal, guest_time_get_order_tests is configured with unwind handling and 20s timeout, and Windows PATH environment modification is correctly set. Requesting changes for the points above.
PrivacyOnion commented 2026-11-16 19:54:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T19:54:55Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_time_get_order_tests built cleanly.
  • CTest (guest_time_get_order):
    1/1 Test #3702: guest_time_get_order .............   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/Export.cpp, core/libs/prx/libSceLibcInternal/libSceLibcInternal.hpp reverted to main and the new tests kept, the suite fails:
    1/1 Test #3702: guest_time_get_order .............   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified in core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp that DateOrderOffset (0x28) matches the PS5 SDK 10.00 _Dateorder member offset in both time_get and time_get<wchar_t>, and that ReadDateOrder_nid_no_patch checks for pointer overflow (address > max - DateOrderOffset) and uses GuestCopyIn_nid_no_patch to safely copy sizeof(int32_t) bytes without host crash risks.
    • Verified in core/libs/prx/libSceLibcInternal/include/TimeGetOrder.hpp and TimeGetOrder.cpp that both _ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE13do_date_orderEv_nid_postfix and _ZNKSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE13do_date_orderEv_nid_postfix match NIDs 8PIh8BFpNYQ and dP14OHWe4nI, use APS5_VABI in extern "C", return std::int32_t, and accept const void* self.
    • Verified in TimeGetOrder.cpp that guest errno is saved and restored around GuestCopyIn_nid_no_patch, guaranteeing that neither successful reads nor defensive std::invalid_argument throws corrupt guest errno.
    • Verified strict AGENTS.md compliance: zero comments in TimeGetOrder.cpp, TimeGetOrder.hpp, and GuestTimeGetOrder.cpp, clean removal of throwing stubs from Export.cpp, and complete technical debt documentation in docs/dev/debt/libSceLibcInternal.md.
    • Verified comprehensive test coverage in core/libs/tests/GuestTimeGetOrder.cpp: validates both char and wchar_t queries over full 32-bit test vectors (0..4, negative numbers, extreme bit patterns), unaligned facet buffers, read-only memory, multi-instance isolation, guard-page fault boundaries via mprotect/VirtualProtect, and invalid/overflow addresses (nullptr, 0x10, max - 0x10).
    • Verified build and test integration in core/libs/prx/libSceLibcInternal/CMakeLists.txt: TimeGetOrder.cpp is linked into libSceLibcInternal, guest_time_get_order_tests is configured with unwind handling and 20s timeout, and Windows PATH environment modification is correctly set.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5926541739 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/19609#pullrequestreview-5926541739). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-16T19:54:55Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `e8f55eb969`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_time_get_order_tests` built cleanly. - **CTest** (`guest_time_get_order`): ``` 1/1 Test #3702: guest_time_get_order ............. Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/Export.cpp`, `core/libs/prx/libSceLibcInternal/libSceLibcInternal.hpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/1 Test #3702: guest_time_get_order ............. Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` Restoring the change makes it pass again. - **Code reading**: - Verified in core/libs/prx/libSceLibcInternal/TimeGetOrder.cpp that DateOrderOffset (0x28) matches the PS5 SDK 10.00 _Dateorder member offset in both time_get<char> and time_get<wchar_t>, and that ReadDateOrder_nid_no_patch checks for pointer overflow (address > max - DateOrderOffset) and uses GuestCopyIn_nid_no_patch to safely copy sizeof(int32_t) bytes without host crash risks. - Verified in core/libs/prx/libSceLibcInternal/include/TimeGetOrder.hpp and TimeGetOrder.cpp that both _ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE13do_date_orderEv_nid_postfix and _ZNKSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE13do_date_orderEv_nid_postfix match NIDs 8PIh8BFpNYQ and dP14OHWe4nI, use APS5_VABI in extern "C", return std::int32_t, and accept const void* self. - Verified in TimeGetOrder.cpp that guest errno is saved and restored around GuestCopyIn_nid_no_patch, guaranteeing that neither successful reads nor defensive std::invalid_argument throws corrupt guest errno. - Verified strict AGENTS.md compliance: zero comments in TimeGetOrder.cpp, TimeGetOrder.hpp, and GuestTimeGetOrder.cpp, clean removal of throwing stubs from Export.cpp, and complete technical debt documentation in docs/dev/debt/libSceLibcInternal.md. - Verified comprehensive test coverage in core/libs/tests/GuestTimeGetOrder.cpp: validates both char and wchar_t queries over full 32-bit test vectors (0..4, negative numbers, extreme bit patterns), unaligned facet buffers, read-only memory, multi-instance isolation, guard-page fault boundaries via mprotect/VirtualProtect, and invalid/overflow addresses (nullptr, 0x10, max - 0x10). - Verified build and test integration in core/libs/prx/libSceLibcInternal/CMakeLists.txt: TimeGetOrder.cpp is linked into libSceLibcInternal, guest_time_get_order_tests is configured with unwind handling and 20s timeout, and Windows PATH environment modification is correctly set. Looks Good To Me
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!19609
No description provided.