feat(libc): export the time_put facet vtable as data #12510
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12510"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by mazen320 on 2026-10-28T16:36:25Z.
What
Export
time_put<char>'s vtable (NIDOwfBD-2nhJQ) as seven zeroeduintptr_tslots so titles that resolve it as data get a 56-byte object matching console titlelibc.prx(PPSA26344). Facet calls through the slots still fault until methods are wired (debt note)._Getcatstill installsg_timePutVtablefor facets it builds.#9038 (
codecvt/numpunct/time_put_Getcat) has landed and is orthogonal. Merge order for the new facet-vtable stack: this PR, then #12511 (money_get), then #12518 (money_put). Other open facet-vtable PRs (#10158, #10200, #10165, #9761) edit different symbols/sections; compose with keep-both on rebase.Tested
guest_locale_tests— passed (Windows MinGW).python tools/check_conventions.py --base upstream/main— passed.OwfBD-2nhJQis STT_OBJECTst_size56 in PPSA26344sce_module/libc.prx(dynsym via PT_DYNAMIC; FTP from the console).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-29T04:13:19Z.
Review: APPROVED
I checked tip
d295b98f23on the host: macOS 26, x86_64, clang with ASan+UBSan.Name / layout.
tools/nid_names.py --name _ZTVSt8time_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEEgivesOwfBD-2nhJQ, which matches the body and the debt line. Seven slots are offset-to-top, typeinfo, the fourFacetVtableentries andTimePutVtable::put(GuestLocale.hppL126-129). That fits the measuredst_size56, and it is the same shape #12704 uses for the wide form._Getcatstill installsg_timePutVtable(L765), so facet construction does not change.Run. I built a standalone
guest_locale_testsfromLocaleSupport.cppandcore/libs/tests/GuestLocale.cpp, both unmodified. A shim supplied the heap hooks,_Locksyslock/_Unlocksyslock,_Znwm/_ZdlPvand__error, and forwardedsnprintf/strftimeto the host. I droppedCheckTimePutandCheckNumPutfrommain()because they fail the same way onmainunder a host-strftimeshim (%E/%O), which is unrelated to this PR.CheckTimePutVtableObject), with no sanitizer reportsmain'sLocaleSupport.cppwith the new test: link fails on the undefined_ZTVSt8time_put..., so the test fails without this changeMutants (all killed):
{}→{1}kTimePutCharVtableSlots = 8static_assert[6]constdefinitionMerge.
git merge-treeagainstmainb433c40f2fis clean, andcheck_conventions --base upstream/mainpasses. Localpr_overlap --branch(1421 open PRs) reports no Same exports. The conflicts are the adjacent appends inGuestLocale.hpp,GuestLocale.cppanddebt/libc.mdwith #9761, #10158, #10165, #10200, #12511, #12518 and #12704, which the body already lists as keep-both.LGTM.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T05:15:49Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The current-main rebase and the measured
time_put<char>export look good, but the checklist uses the title-unblock field to describe the next PR in the stack.What I ran
0780fd984f838420b15891674b5840ea49b9e80dagainst currentmain52c09d567d2fa453494dd720fcf53a98149468e4.git diff --checkfor the exact-head diff.guest_locale_testsand conventions pass on Windows MinGW; current conventions, eligibility, labels, report, Ubuntu/Windows relinker, Ubuntu register-context and relinker ASan pass. Linux product tests are skipped; macOS jobs are queued.Results
37bae2193249e9f8d59dfb4ede0e9a94cf7afb77guest_locale_testspassed on Windows MinGWRaw output
Negative control
st_sizemeasurement is also author-provided.Findings
Blocking
Unblocks: #12511, but that is the next PR in this facet stack, not a title ID and Game bring-up discussion for a measured title stop or wrong result. CONTRIBUTING requiresUnblocks: PPSA... #...for such a title-specific fix, andnoneotherwise. Please set this field toUnblocks: none; the sequence is already described on theDepends online and in the PR body.Non-blocking
st_sizereport, writable-object test, and corresponding debt note are consistent in the reviewed diff.Sources
Not verified
To get this to a good state
Change the checklist to
Unblocks: none. The current-main branch and test report now address my remaining technical re-check.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T05:37:31Z.
Review: APPROVED
Re-checked — approved
The checklist now uses
Unblocks: none, while preserving the declared stack order (#12510 → #12511 → #12518) inDepends onand the body. The current-main rebase and test report remain consistent with the previously reviewed implementation.What I ran
0780fd984f838420b15891674b5840ea49b9e80dagainst currentmain52c09d567d2fa453494dd720fcf53a98149468e4.git merge-tree --write-treeandgit diff --check.Results
git diff --checkUnblocks: none; declared stack order preservedguest_locale_testsand conventions passed on the stack tip containing this headI did not run a local build. The requested checklist correction is resolved and the reported checks cover the exact stack tip.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T04:21:00Z.
Review: APPROVED
Reviewed — looks good
The new
time_put<char>data export is explicitly sized, zero-initialized, covered by a matching test, and its unimplemented facet calls are documented.What I ran
Reviewed head
931387040ac55c1c7401bce9926a2222867bf5f1against current main5ecef095b61e7a406b279c97896f3a8a6fbd6353; merge preview treeec15dfd742cc36fedc88443cc64a6bcb2f960ef85b.Results
Not verified
I did not run a local build/test or independently inspect the console image. The title-image symbol-size evidence and MinGW test result are reported by the author. PR #12510 is the first item in the declared vtable stack.