feat(libSceLibreSsl): implement BIO_printf #16529
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16529"
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 MarcZX10 on 2026-11-07T00:48:33Z.
What
BIO_printfinlibSceLibreSsl, formatting through the libcvsnprintfexport and writing through the BIO's write method.std::invalid_argument.BIO_vfreeis not included; its implementation is handled separately by open PR #16654.Tested
guest_libressl_biofor ordinary formatting, output longer than the stack buffer, an empty format, a read-only BIO, and a short-writing BIO.git diff --check, repository conventions, and the changed-export ABI audit were run. No C++ build or guest test executable was run locally after the rebase; the new head will trigger hosted checks.Checklist
main; no other open PR implements the same functionNotImplemented_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 adriadam10 on 2026-11-10T18:43:18Z.
Review: CHANGES_REQUESTED
Checked the diff against the PR thread and #16654. Needs a few changes:
BIO_meth_*,BN_dup,BN_div,BN_print, ...) and tests that are not in this head. The diff only implementsBIO_printfandBIO_vfree. Please rewrite What/Tested for the current head.BIO_vfreeinlibSceLibreSsl3(src/BioLifetime.cpp). The "no other open PR implements the same functions" box is therefore false. Either dropBIO_vfreehere and keepBIO_printf(and list #16654 under Depends on if you need it), or agree with that PR which one lands.core/libs/prx/libSceLibreSsl/Export.cpp:42-44:writeFormattedreturns -1 whenBIO_writereturns fewer bytes than formatted. LibreSSL'sBIO_vprintfreturns whatBIO_writereturns. Return that value, or record the deviation indocs/dev/debt/libSceLibreSsl.md, and add a test with a BIO whose write is short.core/libs/prx/libSceLibreSsl3/Export.cpp:16-19: the callback branch (callback(bio, 1, ...), return when the result is <= 0) has no test, and the body says a BIO with a callback throws. Cover both results and make the body match the code._WIN32branch ofBIO_printf_nid_postfix(__builtin_sysv_va_list) has no Windows run on this head; a rerun of the Windows check from @JJenkx would settle it.Welcome back once these are addressed.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-10T23:09:17Z.
Review: CHANGES_REQUESTED
Thanks for the update; the short-write return and the BIO_vfree callback tests address two of the earlier points. Still open:
BIO_meth_*,BN_dup,BN_div,BN_print, ...) and tests (guest_libressl3_bio,guest_libressl3_bignum) that are not in this head. The diff implements onlyBIO_printfandBIO_vfree. Please rewrite What/Tested for the current head.BIO_vfreeinlibSceLibreSsl3, so "no other open PR implements the same functions" is still false. Either dropBIO_vfreehere and keepBIO_printf, or agree with that PR which one lands and list it under Depends on.windowscheck is red on this head; please look at whether it comes from the_WIN32__builtin_sysv_va_listbranch ofBIO_printf_nid_postfix(core/libs/prx/libSceLibreSsl/Export.cpp:58-62).Welcome back once these are addressed.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-12T20:32:25Z.
Review: CHANGES_REQUESTED
Thanks for the rebase. The
windowscheck is green now and the code is unchanged; two earlier points are still open, plus one new one:BIO_meth_*,BN_dup,BN_div,BN_print, ...) and tests (guest_libressl3_bio,guest_libressl3_bignum) that are not in this head. The diff implements onlyBIO_printfandBIO_vfree. Please rewrite What/Tested for the current head.BIO_vfreeinlibSceLibreSsl3, so "no other open PR implements the same functions" is still false. Either dropBIO_vfreehere and keepBIO_printf, or agree with that PR which one lands and list it under Depends on.docs/dev/debt/libSceLibreSsl3.md:27still says "42 named callable exports" althoughBIO_vfreeis no longer a stub; lower the count by one or listBIO_vfreeamong the exclusions (unless it is dropped from this PR).Welcome back once these are addressed.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T15:16:37Z.
Review: COMMENTED
I ran
guest_libressl_biowith the patch applied on Linux. It passed the formatted-write cases, including empty output, formatting beyond the stack buffer, read-only failure, and preserving the short-write count fromBIO_write.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.