libkernel: coredump user-data and attach calls answered as outside-the-handler; WriteUserString still unsettled (Broken Sword); branch ready #4144
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 screamm on 2026-10-12T00:01:30Z.
libkernel's coredump user-data calls throw. Broken Sword Reforged (PPSA21480, #3704 comment 6113687542) reaches
sceCoredumpWriteUserString not implementedfrom its fatal path; 007 First Light (PPSA11386) importssceCoredumpWriteUserData. This branch settles the four calls the public sources define and leaves the five they do not, includingWriteUserStringitself, so it does not move Broken Sword (whose real blocker is theagc_graphics.cpp:266error before the dump).Branch ready:
screamm:feat/libkernel-coredump-user-data(two commits onmainbab7b328, head9205b15b:feat(libkernel): implement the coredump user-data calls,feat(libkernel): answer the coredump user-file attach calls). I cannot open it as a PR under the intake rule; anyone eligible is welcome to carry it, keeping the commits as they are. It overlaps textually with open #3821 (same constant and a near-identical region-check helper at the top ofCoredump.cpp); whichever lands second needs a small rebase.coredump_error.hhas exactlyPARAM,NOT_REGISTERED,ALREADY_REGISTERED,NOT_IN_COREDUMP_HANDLER,THREAD_CREATEandSTOP_INFO_UNAVAILABLE, and the Vita header for the same API documents "No user-data capture is active" outside the handler. The handler is never invoked here, sosceCoredumpWriteUserData(const void*, size_t)(returnsssize_t),sceCoredumpAttachUserFile(uint32_t, const char*)andsceCoredumpAttachMemoryRegionAsUserFile(uint32_t, const void*, size_t, const char*)returnSCE_COREDUMP_ERROR_NOT_IN_COREDUMP_HANDLER(0x81180003, the model open #3821 also uses) and store nothing;sceCoredumpDebugTextOut(const char*, int)prints to stderr with the existing[coredump]prefix. Signatures from Orbitaldb_types.jsonand SharpProsperoKernelSystem.cs(facts only). A null, empty or wrapping region, a null path/name/text or a negative length throw, because the console's check order is unknown. The 0x81180003 value is PS4 numbering, unconfirmed on PS5; recorded in TechnicalDebt.sceCoredumpWriteUserString(no declaration in any public source; a register capture at Broken Sword's call would settle it),sceCoredumpSetUserDataType,sceCoredumpGetStopInfoGpu_Agc(no signatures),sceCoredumpGetStopInfoCpuandsceCoredumpGetThreadContextInfo(outside the handler the console could return either of two codes).guest_coredump_user_datachecks the returns before registering, while registered, from another thread and after unregistering, every throw case, and that the caller's buffer is untouched.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs(with open #4021'sSocket.cppguard applied locally, sincemaindoes not compile on MinGW without it):guest_coredump_user_data3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"581/584, the failures being the known Windows failures on currentmain(agc_write_tracking#4087,guest_kernel_stack_protect#4088,agc_driver#3171);tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T07:37:53Z.
Closing: both commits of the branch are on main (#3821, #4197).
sceCoredumpWriteUserStringstill throws; reopen when there is a source for its signature.