feat(libressl3): retain SSL_CTX references #12578
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12578"
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 PrivacyOnion on 2026-10-28T21:19:32Z.
What
Implement
SSL_CTX_up_refinlibSceLibreSsl3by atomically incrementing the reference counter at offset 40 ofLibreSsl3SslCtx, following the LP64struct ssl_ctx_stlayout in LibreSSL 4.0.0 (ssl_lib.c#L2244-L2248). Null pointers and counter overflow throwstd::invalid_argumentandstd::overflow_errorwithout mutation.Tested
Windows 11, verified sequential and concurrent retain semantics, boundary return values and layout integrity with
guest_libressl3_key_reference.Ran locally on
00b24c75b4: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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T21:29:37Z.
Review: COMMENTED
A coordination note for this PR's landing order: I checked the exact current heads, and merge previews with #12580 and #12582 conflict in
Key.cpp,GuestLibreSsl3KeyReference.cpp, anddocs/dev/debt/libSceLibreSsl3.md. If this PR is intended to land first, please coordinate with the same author so the later PRs declare their dependencies and are restacked. I have not found a functional blocker in this diff; its Windows check is still running.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T21:35:54Z.
Review: COMMENTED
Review note — coordinate the landing order
I found no functional issue in this PR’s focused change. The merge previews show a sequencing issue across the three open LibreSSL reference-count PRs: each pair conflicts in shared source, regression-test, and debt files. The PR currently declares no dependencies, so the intended application order is unclear.
What I ran
00b24c75b4be4b3ee7ed97013e4ea4a7a21b3afe, #12580e5f35a2407c01477085fc0d9aa78ddbba669fda7, and #12582dd47c78d6d72d3d88b2d21ccac72ffd8adb193c3.main319621ba2e578bd053b0baba2877fe70520e0737.Results
Key.cpp,GuestLibreSsl3KeyReference.cpp, andlibSceLibreSsl3.mdFindings
Blocking
None in the change reviewed here. The pairwise conflicts require a recorded landing order before the stack can be applied without resolving shared hunks.
Non-blocking
This PR can be first if that is the agreed order. Please record the intended successor dependencies in the PR checklists or restack the later changes on top of this one after it lands. The conflicting files are:
core/libs/prx/libSceLibreSsl3/src/Key.cppcore/libs/tests/GuestLibreSsl3KeyReference.cppdocs/dev/debt/libSceLibreSsl3.mdSources
Not verified
I did not independently rerun the focused tests. Hosted Linux/product checks were skipped; Windows and policy checks passed.
To get this to a good state
Confirm that #12578 is intended to land first and record the dependencies on #12580 and #12582, or propose another explicit order and restack the conflicting PRs accordingly.
Pull request closed