Repository navigation
feat(libSceLibreSsl3): implement X509_STORE_CTX_new, free, get0_param and X509_STORE_up_ref - #15544
Conversation
Progress report (df8dbb0 → 18585c7)📈 System libraries: 35.75% (+0.0078%, +3 implemented functions) ✅ 3 implemented
Changed libraries (implemented exports)
|
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (8 IDs in 470 tests)Skipped (7)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
feec18a to
771a4e4
Compare
771a4e4 to
bd911ad
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
bd911ad to
933c089
Compare
933c089 to
36655ae
Compare
36655ae to
d964de8
Compare
d964de8 to
a1111c4
Compare
|
I prepared a merge of main for your AI-assisted: yes (Codex). |
… and X509_STORE_up_ref Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
a1111c4 to
18585c7
Compare
|
Checked the four exports against LibreSSL |
What
Implements four
libSceLibreSsl3exports that threwNotImplemented_nid_no_patch:X509_STORE_CTX_new,X509_STORE_CTX_free,X509_STORE_CTX_get0_paramandX509_STORE_up_ref. The module forwardsX509_STORE_new,X509_STORE_freeand theX509_STORE_CTX_*getters and setters to libSceLibreSsl, so the new code uses that library's layouts: the 136-byte store withreferencesat offset 128 and the 240-byte context.Source: LibreSSL
x509_vfy.c(X509_STORE_CTX_new,X509_STORE_CTX_free,X509_STORE_CTX_cleanup,X509_STORE_CTX_get0_param) andx509_lu.c(X509_STORE_up_ref) at 078b3d1d.X509_STORE_CTX_newreturns a zeroed guest-heap context;X509_STORE_CTX_get0_paramreturnsparam.X509_STORE_up_refincrementsreferencesatomically and returns 1 when the new count is above 1, otherwise 0.X509_STORE_CTX_freeignores null and frees the context. Its cleanup also releases a cleanup callback, an owned verify parameter, the policy tree, the chain and the extra data; those paths throw without changing the context, because the code that releases them is not available here.Deliberate divergences, recorded in
docs/dev/debt/libSceLibreSsl3.md:X509_STORE_CTX_newdoes not queueERR_R_MALLOC_FAILURE(the error queue is not modelled), null arguments toget0_paramandup_refthrow where LibreSSL dereferences them, andup_refthrows atINT32_MAX.Open PRs: none implements these four functions; I searched the diffs of the open PRs that touch these files, including the 18 the overlap tool could not compare (#12315, #14465, #14499, #14612, #15163, #15514, #15627, #15629, #15631, #15737, #15758, #15760, #15761, #15765, #15770, #15826, #15831, #15854);
git log -Gfor the four exported names over those PR heads finds no commits. Several touch the same debt file and the test list inCMakeLists.txt, which will need a trivial rebase.Tested
Windows 11, at 8600542dc5.
ctest --test-dir build-full -R "guest_libressl3_(x509_store_context|x509_verify_param|stack)":The new test covers all four functions, the throwing free paths, leaks and 8 threads x 20000
up_refcalls.tools/check_conventions.py --base origin/mainpasses.I changed 17 conditions and statements in the new code one at a time and the test failed on each.
Not covered by a test: allocation failure of
X509_STORE_CTX_new.Not verified: I also ran all the repository's tests on Windows and Linux, and every libSceLibreSsl3 test passed; the only failures were select_tests_MissingCommandTests, vulkan_validation_gate_commands and guest_mmap_executable, which fail on main on this machine too. Nothing was run on a console, and the 240-byte context and 136-byte store layouts of the console's libSceLibreSsl3 are not checked against it.
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)