Repository navigation
feat(libSceHttp2): store cookies in cookie boxes - #10534
Conversation
Progress report (afc780e → 93f7df5)📈 System libraries: 51.01% (+0.05%, +7 implemented functions) ✅ 7 implemented
Changed libraries (implemented exports)
|
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
The oversized-pool guard throws std::overflow_error from this guest-facing extern "C" API. A guest can reach this path with a poolSize above SIZE_MAX - 0x3fff, so the overflow is converted into a C++ exception crossing the ABI boundary (or terminating the process if it is not caught). Please return the project/API error code for an invalid or unrepresentable pool size instead, and add a regression that passes a near-SIZE_MAX value and verifies a normal error return without allocation or exception escape. The ordinary cookie tests and PR checks do not exercise this input.
|
Fixed in 62c4148: |
MarcZX10
left a comment
There was a problem hiding this comment.
The current head addresses the reported oversized-pool path: rounding overflow and failed array allocation now return the out-of-memory code, and tests cover near-SIZE_MAX inputs. The focused ASan/UBSan run is author-reported; hosted structural checks pass, while product builds are skipped. Please resolve the remaining direct overlap before merge: #10167 changes sceHttp2CookieFlush, sceHttp2CreateCookieBox and sceHttp2DeleteCookieBox in the same Export.cpp, while this PR implements those functions against its cookie store. The current #10167 version makes CookieFlush throw and changes the Create/Delete handle operations, so the behavior cannot be combined by a simple file rebase. Coordinate with its author on an order and the intended composed behavior, then record the dependency/order in this PR. Also coordinate the shared CMake/test relocation with #6044 so GuestHttp2Cookies and its registration are preserved.
|
The debt entry says errors, limits and accounting are assumed, so I ran this PR's Same as this PR: ids that don't exist, or a deleted box, give Different on 13.42:
Not checked: the default total limit, and the clock-dependent parts beyond the cases above. |
|
Tested head
AI-assisted: yes (Claude Code); results above were run on this machine. |
|
Thanks a lot for running the sequence against the real module, this is exactly what the debt entry was missing. Pushed 172a0cc, which follows your results:
The test asserts all of these, so it encodes your measurements. Not reproduced: the |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VcCKPwMu3oNWaS8AUph6MW
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
172a0cc to
93f7df5
Compare
Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.
|
Rebased onto current main (the HTTP/2 transport from #10167 touched the same Checked the six cookie exports against the 13.42 run in this thread (error codes, no-match, |
What
Gives the cookie boxes
sceHttp2CreateCookieBoxalready creates a real cookie store, in a newCookies.cppso it stays out of the transport work inExport.cpp:sceHttp2AddCookie,sceHttp2GetCookie,sceHttp2GetCookieStats,sceHttp2SetCookieMaxNum,sceHttp2SetCookieMaxNumPerDomainandsceHttp2SetCookieMaxSize, with signatures from SharpProspero'sHttp2.cs, declared ininclude/Http2.hpp.libSceHttp2.sprx(thanks to the reviewer who ran it): error codes, the no-match error,required= header length + 3, no scheme check, refused foreignDomain, cookies without=, prefix/suffix matching, the 4096/50 default limits, oldest-first eviction, a limit of 0, and the 32-byte stats with their size accounting. Expiry keeps the RFC 6265 date algorithm, which matched every tested date.sceHttp2CreateCookieBoxmaps its pool from flexible memory as 13.42 does and returns the kernel's error unchanged.sceHttp2CookieFlushempties a box andsceHttp2DeleteCookieBoxdrops its cookies.sceHttp2GetCookieBox/SetCookieBoxare untouched (feat(http2): add synchronous HTTP/2 transport over TLS #10167 changes them).What is still assumed (default total limit, the bytes after the header, the stack check that is not reproduced) is listed in
docs/dev/debt/libSceHttp2.md.Tested
GuestHttp2Cookies.cpp(registered asguest_http2_cookies) passes plain and under ASan/UBSan, built by hand against Export.cpp and Cookies.cpp with the kernel's flexible-memory calls stubbed.tools/check_conventions.py --base origin/mainpasses.9bcdf99c59) was built and passed 3 of 3 runs by a reviewer; the current head has not been rerun there.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)Generated with Claude Code