libSceAmpr: three locale data NIDs are exported as throwing functions #8875
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 UnhealthyKraken on 2026-10-21T03:55:14Z.
Problem
Three locale data NIDs are currently exported by libSceAmpr as
int(void)functions calling NotImplemented. The public SDK labels the corresponding symbols as objects in libSceLibcInternal. Resolving an object's address to a throwing function does not provide an unsupported-object trap: a data consumer reads code bytes instead of calling that function.-mLzBSk-VGs_ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idEa54t8+k7KpY_ZNSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idEKfcTPbeaOqg_ZTVSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEEEvidence
@object(time_get at line10126), and the vtable entry is also@object. The Itanium ABI identifies the TV special name as a virtual table, whose contents are data describing the class.Independent Windows validation
Own-source build at8e1f4f802eb0e0df550c39df9c9ee20cf2e8ff43 (base4f24b6a64c plus unrelated feholdexcept), GCC15.2 Release, Windows x86-64. No games, proprietary modules or captures.
Parsed the built PE export tables and section characteristics. All three providers are only libSceAmpr, with RVAs0x50b0,0x5100,0x50e0 respectively, in
.text. Loaded the isolated built modules and used GetProcAddress/VirtualQuery: each resolved address is PAGE_EXECUTE_READ (0x20). GetProcAddress returns null for all three NIDs in libSceLibcInternal and libc. No guest function was invoked and no purported object was dereferenced. This validates the bindings and their representation; it does not establish correct object contents or console layouts.Minimal binding probe (pass the absolute directory of locally built patched libraries; include compiler runtime DLLs there):
The first module prints true for all three; the other two print false.
objdump -pon the patched PE plusobjdump -don the unpatched Ampr identify the code targets; source confirms they are functions.Remaining implementation questions
The two ID objects need verified size/alignment, initialization, assignment/guard synchronization, identity sharing across re-export modules and integration with locale facet registration. The vtable needs the correct Dinkumware facet layout, RTTI/address point and method ABI. SDK object labels and C++ mangled names do not establish those details or module/library versions. I have not replaced these functions with guessed storage, invented facet methods or a success stub.
AI-assisted investigation and reproduction.
Imported from boykopovar/AnyPS5. Originally posted by mazen320 on 2026-10-21T20:39:22Z.
Console measurement (jailbroken PS5 FTP
192.168.0.144,libSceLibcInternal.sprxSHA-256a2d70cc64c3abc3927662cbe0c3765b74b2385b4b2ad80eb7b942a891f9259fb, parsed with the module's ownDT_SYMTAB/DT_STRTAB; no Ghidra).st_infost_size-mLzBSk-VGsnum_get<char>::idSTT_OBJECTSTB_WEAKa54t8+k7KpYtime_get<char>::idSTT_OBJECTSTB_WEAKKfcTPbeaOqgnum_get<char>vtableSTT_OBJECTSTB_WEAKlibSceAmpr.sprxfrom the same console has no dynsym entries for these three NIDs (Ampr is 152STT_FUNC+ 2 unrelatedSTT_OBJECT). That matches moving the providers into libc and dropping the Amprint(void)stubs.Mismatch with this PR head: the vtable is exported as 15
uintptr_tslots (120 bytes). On the console the symbol size is 136 (17 slots). Ids of size 8 and zero-init match what you already have. Suggest sizing_ZTVSt7num_get...to[17]sost_sizematches the console export; a 15-slot object is short by two pointers relative to the firmware symbol.REA: Ghidra/Hopper not usable for these ELF SPRX on Windows here; sizes come from the ELF symbol table only. No title run.
Imported from boykopovar/AnyPS5. Originally posted by UnhealthyKraken on 2026-10-22T03:16:29Z.
I checked the current #8880 source at
2a796cb4473db98e1df827fe137d32dcea39880c: the proposed num_get vtable is now[17], and the tests declare the same extent. The earlier 15-slot mismatch is therefore addressed in that proposal. It also removes the three Ampr function-shaped providers and defines the objects in libc.Your reported symbol-table measurements corroborate the object kinds and 8/8/136-byte extents; I am recording them as attributed contributor evidence, not an independently repeated console measurement. The current proposal still uses zeroed vtable storage and documents that facet calls are unsupported. Object binding/extent and working facet behavior remain distinct claims. #8880 is still open, so the reported current-main ABI problem should stay open pending integration; no duplicate implementation is needed.