fix(libc): hand out the unwind cursor table through a _nid_no_patch export #5014
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5014"
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 oneandonlydean on 2026-10-13T08:13:31Z.
What
The Windows job fails on
patched_librariessince #4945 was merged (first seen on builds based on6d7b873702, and on the push build offc1f063f51):#4945 gave
_Unwind_Contexta default member initializer that points atLibcUnwind::CursorSlots, a C++ data symbol defined in libc. On WindowsLibcUnwind::Framecontains an_Unwind_Context, and libSceAgcDriver builds frames inStackWalk.hppfor the worker sampler, so it now imports_ZN10LibcUnwind11CursorSlotsEfromlibc.prx. The NID patcher renames that export in the patched libc and does not touch the import (it only rewritessce*and_nid_postfixnames), so the patched libSceAgcDriver has an import nothing exports. libSceAgc and libSceVideoOut link to it and fail the same way. Linux is not affected becauseFramehas no context member there.The table is now local to
Unwind.cppand the context reads it throughUnwindCursorSlots_nid_no_patch(), the same naming the other libc helpers used across libraries have, so the name is the same in the patched libc and in the importer. Behaviour of #4945 is unchanged.Tested
Linux, GCC, Release: built libc, all patched libraries and the tests below;
patched_libraries,exception_runtime(includes the cursor table check from #4945),exception_personality,exception_c_cleanup,guest_exception_handler,guest_raise_exception,guest_unwind_module_info,guest_dynamic_cast,agc_stack_walk,unwind_record_boundsand the standaloneregister_contexttests pass. The patchedlibc.prxexportsUnwindCursorSlots_nid_no_patchunder that name.Not built on Windows locally. The cause is read from the sources and the CI logs; the Windows job of this PR is what shows the three libraries load again.
The Linux failure of
guest_fminfon main (fminf check failed at line 33, from #4592) is a different problem and is not touched here.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)