Skip to content

feat(libSceLibreSsl3): accept null X509 item disposal - #16185

Closed
MarrasFederico wants to merge 3 commits into
boykopovar:mainfrom
MarrasFederico:feat/libressl3-x509-null-free
Closed

MarrasFederico wants to merge 3 commits into
boykopovar:mainfrom
MarrasFederico:feat/libressl3-x509-null-free

Conversation

@MarrasFederico

@MarrasFederico MarrasFederico commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What

AUTHORITY_KEYID_free, X509_EXTENSION_free and X509_CRL_free now accept null as a no-op. All non-null objects remain unsupported and throw before dereference. Their void(void*) declarations replace the unknown-signature placeholders; the bodies move out of AdditionalExports.cpp. The additional inventory drops from 145/135 to 142/132 total/named exports and removes the three rows.

AUTHORITY_KEYID_free, X509_EXTENSION_free and X509_CRL_free - not measured on a PS5; non-null object disposal remains unsupported and throws before dereference. The null no-op follows LibreSSL 4.0.0 AUTHORITY_KEYID_free, X509_EXTENSION_free, X509_CRL_free and their ASN1_item_free dispatcher.

The LibreSSL3 debt/count edits share inventory bookkeeping with #16111, #15599 and #15601; CMake/header and neighboring debt insertions also overlap other open LibreSSL3 work. These totals must be reconciled in merge order; none is a functional dependency.

python3 tools/pr_overlap.py --branch feat/libressl3-x509-null-free --repo boykopovar/AnyPS5 --base main --jobs 2 examined 1899 open PRs. It returned 2 because some older heads cannot merge with its base. I compared all 48 reported shared-file heads with their own merge bases, including the original placeholder locations and added declarations/definitions: none changes or implements these exports. Searches by function name found no existing implementation PR.

The related #16186 handles different null frees and also changes the additional-export table/count and CMake insertion point. Its bookkeeping must be reconciled according to merge order; no export is shared.

Tested

Ubuntu 26.04.1 LTS x86-64, GCC 15.2.0, Release, BUILD_TESTING=ON, base 151a2cb6e274f594a09c8a2ca42f44af2e5c40d8. Windows/macOS and PS5 hardware were not tested; no title was run.

  • Built only guest_libressl3_x509_item_free_tests in the separate build clone, with nice -n 19 cmake --build build --parallel 2 --target guest_libressl3_x509_item_free_tests. No overlapping builds.
  • ctest --test-dir build -R '^guest_libressl3_x509_item_free$' --output-on-failure passes.
  • Negative controls for AUTHORITY_KEYID_free_nid_postfix, X509_EXTENSION_free_nid_postfix, X509_CRL_free_nid_postfix: replaced one body at a time with the original throwing placeholder, retaining the corrected declaration, rebuilt the same target and observed the new checks fail. Restored all bodies, rebuilt and reran: passes.
  • python3 tools/check_conventions.py --base upstream/main, git diff --check and the public-header declaration/umbrella audit pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Merge verification: updated against main eed8517b310a55adbbb178df781d7d9ed2eeee7b with a normal merge. Main and this PR are preserved independently; the implemented function bodies are unchanged. Built guest_libressl3_x509_item_free_tests with nice -n 19 cmake --build build --parallel 2 --target guest_libressl3_x509_item_free_tests; ctest --test-dir build -R '^guest_libressl3_x509_item_free$' --output-on-failure passes. Conventions and the public-header audit pass. No console or Windows run.
The additional-export inventory is 142 (132 named, 10 NID-only). Only this PR’s table rows were removed.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 6, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 14889 docs/dev/debt/libSceLibreSsl3.md L66, L216
PR 14890 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp L221-236
core/libs/prx/libSceLibreSsl3/include/Api.hpp L282-285
docs/dev/debt/libSceLibreSsl3.md L66, L90-92, L216
PR 15449 docs/dev/debt/libSceLibreSsl3.md L66, L216
PR 15544 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp L115-122
core/libs/prx/libSceLibreSsl3/include/Api.hpp L250-251
docs/dev/debt/libSceLibreSsl3.md L66
PR 15591 docs/dev/debt/libSceLibreSsl3.md L66, L204-205
PR 15616 docs/dev/debt/libSceLibreSsl3.md L66
PR 15618 docs/dev/debt/libSceLibreSsl3.md L66, L216
PR 15620 docs/dev/debt/libSceLibreSsl3.md L66
PR 15622 docs/dev/debt/libSceLibreSsl3.md L66
PR 15623 docs/dev/debt/libSceLibreSsl3.md L66
PR 15625 docs/dev/debt/libSceLibreSsl3.md L66
PR 16249 docs/dev/debt/libSceLibreSsl3.md L66
PR 16529 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp L229-234
core/libs/prx/libSceLibreSsl3/include/Api.hpp L282-285
PR 16586 docs/dev/debt/libSceLibreSsl3.md L66
PR 16588 docs/dev/debt/libSceLibreSsl3.md L66
PR 16589 docs/dev/debt/libSceLibreSsl3.md L66

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.

Pull request Shared files not compared
PR 12315 core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 14212 docs/dev/debt/libSceLibreSsl3.md
PR 14465 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 14499 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 14612 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15163 core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15514 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15627 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15629 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15631 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15737 core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15758 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15760 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15761 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15765 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15770 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15826 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15831 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md
PR 15854 core/libs/prx/libSceLibreSsl3/AdditionalExports.cpp
core/libs/prx/libSceLibreSsl3/CMakeLists.txt
core/libs/prx/libSceLibreSsl3/include/Api.hpp
docs/dev/debt/libSceLibreSsl3.md

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 7, 2026
@MarrasFederico MarrasFederico closed this by deleting the head repository Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant