feat(libc): export std::underflow_error type info, vtable and destructor #10608
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10608"
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 edubox on 2026-10-24T12:28:48Z.
What
Export
std::underflow_error's type info (oNRAB0Zs2+0), vtable (ZrFcJ-Ab0vw) and destructor (ywv2X-q-9is) next tooverflow_error.Minecraft Legends (PPSA05510) imports
_ZTISt15underflow_error; the library had no type info, vtable or destructor for this class, so the loader refused the title. The record uses the same single inheritance overruntime_errorasoverflow_error, and the destructor releases the allocated message.Tested
CachyOS Linux 7.3.0-3, Ryzen 9 9900X, GCC 16.2.1,
mainb84322da6a.cmake --build build --target guest_underflow_error_testsbuilds.ctest --test-dir build -R '^guest_underflow_error$'passes. The test checks the type name, the base record, the shared vtable entries, construction throughruntime_error(const char*)and that the destructor clears the message twice.libc.prxexportsoNRAB0Zs2+0,ZrFcJ-Ab0vwandywv2X-q-9is(nm -D).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 MarcZX10 on 2026-10-24T12:35:30Z.
Review: APPROVED
Reviewed exact head
0d17917ef8. The typeinfo name and single-inheritance base, address-point offset, vtable entries, and D1 destructor follow the neighboringoverflow_errorrecord. The test directly checks those records and vtable slots, constructs a message through the sharedruntime_errorconstructor, and verifies cleanup including repeated destruction. Hosted eligibility, conventions, intake, labels, report, register-context (Linux Debug/Release and macOS Intel Debug/Release), write-watch, Linux/macOS relinker, and ASan checks pass; Linux/Windows full product builds are skipped, and the Windows plus macOS x86-64 relinker jobs are still running. The focusedguest_underflow_errorbuild/test is reported by the author on Linux; I could not reproduce it locally because full CMake configuration stops at the missing system SDL2 package, and the worktree does not have submodules initialized. I found no code blocker.