fix(libSceHttp2): report a live context's pool size from sceHttp2GetMemoryPoolStats #11616
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11616"
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 milescoviello on 2026-10-26T22:56:04Z.
What
MXGP 26 (PPSA30839) stops 13 s after launch on current
main:#10167 made
sceHttp2GetMemoryPoolStatsthrow for a live context, because its HTTP allocations are not charged to the context pool. Before that it returned the pool size with zero use. MXGP calls it from Unreal Engine's network memory logging, next tosceSslGetMemoryPoolStatsandsceNetGetMemoryPoolStats. It readspool_size,max_inuse_sizeandcurrent_inuse_sizeinto its own counters and never checks the result. With the throw, it aborts before its first menu. Borderlands 4 (PPSA01494) and Super Meat Boy 3D (PPSA31162) make the same call next to the same two calls; I have not run them on this change.For a live context,
sceHttp2GetMemoryPoolStatsnow reports the pool size given tosceHttp2Initand zero peak and current use, assceHttpGetMemoryPoolStatsdoes for libSceHttp. The existing libSceNet entry records what the console reports for a fresh context, 0x1640 bytes in use. Null output and unknown or terminated ids return the same errors as before.Call sites (
callto the import's PLT stub; the 25 bytes ending at each call's opcode occur once in the title'seboot.bin):eboot.binHow
Export.cpp:sceHttp2GetMemoryPoolStatswrites{poolSize, 0, 0, 0}from the context handle instead of throwing.GuestHttp2.cppandGuestMemoryPoolStats.cppchecked for the throw. They now seed the output with nonzero values and require the init pool size (0x10000 and 0x40000) with zero peak, current use and reserved field.docs/dev/debt/libSceHttp2.md: the TLS-settings entry's last sentence now says what is reported and names the three titles.Overlap. #10536 and #11611 rewrite other parts of that same debt line and keep its old last sentence, so whichever lands second has a one-line conflict: keep their text and this PR's last sentence. Their code hunks apply cleanly on this branch (
git apply --check). #11470 already conflicts withmain. A follow-up forsceHttp2SetResolveRetry, the next call these titles make, is stacked on this branch.Tested
Linux (Ubuntu 26.04.1, GCC 15.2), Release.
^(guest_http2(_.*)?|guest_ssl(_.*)?|guest_net_.*|net_.*|guest_sce_net(_.*)?|guest_memory_pool_stats|guest_http(_response_header|_options)?|patched_libraries|public_headers)$, pass 3 of 3 (ctest --repeat until-fail:3).main'sExport.cppboth abort withsceHttp2GetMemoryPoolStats not implemented.APS5_PAD_INPUT_FILE. Onmain74acfad65bit exits at 13 s with the error above. On this branch the stats call passes, and it exits at 8 s on the next call,sceHttp2SetResolveRetry not implemented, which the follow-up covers.guest_http2,guest_http2_transportandguest_memory_pool_statspass 3 of 3 on bothmain74acfad65band this head.tools/check_conventions.py --base upstream/mainpasses.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)sceHttp2GetMemoryPoolStatsstop (PPSA01494 and PPSA31162 make the same call, not run)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T23:00:24Z.
Review: APPROVED
Reviewed exact head
04db088075749cb3c13b50bc64875cfc8981e313; no actionable findings. The live-context path reports the stored init pool size and zero use/peak/reserved fields, consistent with this implementation not charging its host allocations to the guest HTTP pool. Null output and invalid-id handling are unchanged; tests seed all output fields and check the returned values. I manually checked the declared overlap with #10536 and #11611: their debt-line edits are distinct prose that must be preserved together; the Export.cpp behavior change is localized to the stats function. The author reports the focused 48-test selection passing three times and a title startup progressing past this call; I did not rerun locally. Hosted eligibility, conventions, intake, labels and report checks pass; build/relinker/product checks are skipped by path policy.