fix(libSceSharePlay): accept a null heap in sceSharePlayInitialize #2946
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2946"
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 SleglJan on 2026-10-10T18:46:17Z.
What
sceSharePlayInitializethrew on a null heap. PPSA11386 (007 First Light) callssceSharePlayInitialize(NULL, 0x1800)at start-up. On any non-zero result it logssceSharePlayInitialize() failed (0x%x)and executesint 0x42. That is read at the call site in the relinked executable:mov esi, 0x1800; xor edi, edi; call; test eax, eax; jepast the log and the trap. So the console accepts a null heap with a non-zero size. This implementation keeps no state and does not use the heap. A zero size still throws, because its error code is unknown. The null and zero checks came with #153. Recorded in TechnicalDebt.libSceSharePlay gets its own
CMakeLists.txtfor the test, modelled on libSceShare's. It linkslibcand callsconfigure_windows_unwind, because the test checks a throw.This is 007's next stop on
main1476f769, row 2 of #2523. Row 1 was #2830 and #2831, both now merged. Row 3 (#1921) is already passed onmainby #1964, so with this change the title stops next on row 4.Overlap: no open pull request changes libSceSharePlay.
Tested
Linux (CachyOS, kernel 7.2.9, GCC 16.2.1), Ryzen 9 7950X3D, RTX 3080 (NVIDIA 615.71.09), Release with
BUILD_TESTING=ONandANYPS5_ENABLE_SPIRV_TOOLS=ON, this branch onmain1476f769. Of 705 tests, 700 pass, fourvideo_out_flip_*tests (lifetime, reopen, controls, overlay) skip (no Vulkan in SDL's offscreen video driver), andagc_driver_dcc_keys_first_writefails, which is #2767 (NVIDIA, Linux).The new
guest_share_playtest covers three cases:sceSharePlayTerminate, which returns 0;It passes 3 repeats. It was written first: on the earlier base
8b393b6eit aborted on the null-heap call without the change, and accepting a zero size fails it.tools/check_conventions.py --base upstream/mainandgit diff --checkpass.PPSA11386 v01.018.000, relinked on
main1476f769and run in a bubblewrap sandbox. Without this branch the loader passes and the title stops withsceSharePlayInitialize: invalid argument. With it, the title continues and stops next onVideoOut: unsupported display pixel format 0xc001000622000000(row 4 of #2523, SleglJan/AnyPS5#18).Windows was last built and tested on the earlier base
8b393b6e, with head b175756b and the same code: fork run 37987894734, Windows 512/512 withguest_share_playpassing.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01Fnrk5Dazjb2tLooVSpdRQq