Repository navigation
feat(libc): implement std::__throw_bad_variant_access - #7506
Merged
oneandonlydean merged 1 commit intoOct 19, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
Onimusha: Way of the Sword (PPSA27836 01.000.001) imports _ZSt26__throw_bad_variant_accessv (9G6z-nF6njg) from libc, and its bundled libc.prx does not export it, so the title fails to load with an unresolved import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GtXavMkgCTCdmRpweviHcQ
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
12 tasks done
Progress report (9caecfd → 9f3e867)➖ System libraries: 90.32% (+0.0%, +1 implemented functions) ✅ 1 implemented
|
Contributor
|
Linux results, which the description lists as not run. WSL Ubuntu 24.04 (gcc 13.3), Release,
AI-assisted: yes (Claude Code); results above were run on this machine. |
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
Onimusha: Way of the Sword (PPSA27836 01.000.001) imports
_ZSt26__throw_bad_variant_accessv(NID9G6z-nF6njg) fromlibc. The title's bundledlibc.prxdoes not export it and neither does ours, so on main it stops about 4 s after launch with:This adds
std::__throw_bad_variant_accessnext to_Throw_bad_weak_ptr: astd::bad_variant_accesstype record and vtable deriving fromstd::exception, thrown throughThrowPlain.what()returnsbad_variant_access, the string LLVM libc++ uses (the export carries libc++'s__throw_bad_variant_accessname); the console's string is unverified and recorded indocs/dev/debt/libc.md.ExceptionRuntime.cppchecks it the same way asbad_weak_ptr: the call throws, a hostcatch (const std::bad_variant_access&)catches it, andwhat()matches.Only this one export is missing for the title.
tools/import_audit.pywithout--modulesalso listswcsncpy_s(Slmz4HMpNGs),wcsncat(pA9N3VIgEZ4) andnum_put<char>::_Getcat(hNAh1l09UpA), but the title's ownlibc.prxcontains those three NIDs and only9G6z-nF6njgis absent from it; the loader resolves the bundled module first. (#6144 adds the two wide-string functions for other titles.)Tested
Windows 11 10.0.26200.9711, WinLibs GCC 15.2.0 r7, Release, RTX 5070 Ti (NVIDIA 617.42). This commit on main b51c65d, dump PPSA27836 01.000.001, relinked with
--windows,APS5_PLAYGO_UNLISTED_CHUNKS=installed(the dump has no PlayGo metadata).AGC graphics: vkQueueSubmit graphics: Vulkan result -4(the device loss in AGC: VK_ERROR_DEVICE_LOST (read invalid) on the first scene load only with host imports (Onimusha: Way of the Sword, PPSA27836, NVIDIA) #6374); the other exited with 0xC0000005 after 186 s, and that log was overwritten before I read it. In earlier runs on the same main with this function plus local copies of the other three, the same load ended once at the AGC: native 4-sample D32 depth sampled with HTILE but without ITERATE_256 is refused (Onimusha: Way of the Sword, PPSA27836) #6362 refusal and once at the AGC: VK_ERROR_DEVICE_LOST (read invalid) on the first scene load only with host imports (Onimusha: Way of the Sword, PPSA27836, NVIDIA) #6374 device loss (read invalid at 0x5af5000).python tools/check_conventions.py --base origin/mainpasses.ExceptionRuntimetest (it includes<sys/wait.h>, so not built in my Windows/MinGW tree); Linux; macOS.Checklist
main; no other open PR implements the same functions. Overlaps, each in adjacent lines where both sides stay:StandardExceptions.cppwith feat(libc): throw bad_optional_access like bad_weak_ptr #6079 (bad_optional_access, the same pattern next tobad_weak_ptr);docs/dev/debt/libc.mdwith feat(libc): scan 16-bit wide conversions on Linux #7386 (the neighbouring entry).NotImplemented_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)