Repository navigation
Conversation
PS5MC (PPSA99420) imports wcsftime (XbVXpf5WF28, aerolib) as the last
absent libSceLibcInternal import in its registry order (index 481), so
its predicted stop is:
FAIL: unresolved ELF import XbVXpf5WF28 from libSceLibcInternal.prx
The stop is predicted from the import order, not observed in a run.
wcsftime follows FreeBSD 11.4 lib/libc/locale/wcsftime.c (8c639945):
the wide format is converted with wcsrtombs, strftime fills a buffer of
maxsize * MB_CUR_MAX bytes limited to maxsize, and mbsrtowcs converts
the result back. A format unit that the single-byte C locale of
lib/libc/locale/none.c cannot encode returns 0 with EILSEQ, a maxsize
whose product with MB_CUR_MAX overflows returns 0 with EINVAL, and an
empty or overflowing result or a null buffer returns 0 with errno
unchanged; the ERANGE or EINVAL set by the Windows CRT's strftime is
discarded. A null format or tm throws, as FreeBSD dereferences it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 06ed477)
9 tasks done
Contributor
|
Independent pre-review on Linux (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
|
Collaborator
|
Closing: the PS5MC stop at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements
wcsftime(XbVXpf5WF28), which is absent fromlibSceLibcInternalon currentmain. PS5MC's import audit lists this as its next unresolved import (registry index 481); the startup failure is predicted from the registry and has not been observed in a game run:The implementation follows FreeBSD 11.4's
wcsftimeover the guest library'swcsrtombs,strftimeandmbsrtowcs, with the current single-byte C locale and 16-bit guestwchar_t. It preserveserrnofor empty or oversized results and null output, reportsEILSEQfor an unconvertible format, and throws for nullformatortm, consistent with the repository's exact-behaviour-or-throw rule.This carries David's tested commit
06ed477efrom #3625, with its commit authorship and co-author credit preserved. Thanks to @screamm for the import audit, FreeBSD comparison and Windows validation.Tested
guest_wide_formatting_testsandguest_time_conversion_tests;guest_wide_formattingandguest_time_conversioneach passed three consecutive runs.python3 tools/check_conventions.py --base upstream/mainandgit diff upstream/main --checkpassed.Checklist
main; no other open PR implementswcsftimeNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository