feat(libSceJemspace): declare thirteen pending exports #9452

Merged
kyon-eth merged 2 commits from upstream-pr/9452 into main 2026-10-23 01:37:37 +00:00
kyon-eth commented 2026-10-21 22:32:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kyon-eth on 2026-10-21T22:32:19Z.


What

Replace the libSceJemspace dummy entry with thirteen pending named exports: create/destroy, malloc/free, calloc, realloc, memalign, reallocalign, POSIX alignment, usable-size queries, statistics, purge, and statistics printing. Every name hashes exactly to a defined function NID in the module export table. Every declaration calls NotImplemented_nid_no_patch. The two added names match defined function entries: sceJemspacePrintStats → 4aop4GKLZaA, sceJemspacePurge → s686MsLMwns.

These are import-resolution entries only. The no-parameter declarations do not establish signatures or allocator behavior; this PR does not implement allocation, ownership, statistics, or title compatibility. The debt entry records these limitations, the unverified firmware version, and the unimplemented signatures and behavior of all thirteen declarations.

Tested

Revalidated on 2026-10-22 against d6eafa54d (main) after adding the two review-requested declarations. Both macOS architecture compile/export checks, the eight focused CTests, conventions and diff/privacy checks passed again.

  • macOS / AppleClang, arm64 and x86-64: compiled and linked the complete changed production source as an unsigned shared library with C++20, -Wall -Wextra -Werror, chained fixups, and -Wno-return-type-c-linkage for existing shared-header declarations. Runtime imports were left unresolved for this standalone build check.
  • Built upstream nid_patcher from the same checkout, patched both architecture builds, and used its exported-name reader to verify the exact thirteen expected NIDs with no missing or additional exports.
  • Progress audit: 0 implemented, 13 pending.
  • CTest: progress_report, progress_wrappers, conventions_unknown_nids, nid_database_cache, pr_overlap_exports, pr_overlap_wrapped_exports, conventions_doc_links, and conventions_pr_template passed (8/8).
  • python3 tools/check_conventions.py --base origin/main and git diff --check origin/main...HEAD passed.
  • python3 tools/pr_overlap.py --branch feat/jemspace-pending-exports --repo boykopovar/AnyPS5 --jobs 6 completed after the review update: no overlap with open pull requests.

No full Linux/Windows build, allocator runtime test, title run, or console test is claimed. Linux/Windows compilation and full runtime integration remain unverified. GitHub conventions, intake, and label checks passed; these do not establish runtime or supported-platform build correctness. No symbol-only tests were added.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4959248203 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9452). Originally posted by [kyon-eth](https://github.com/kyon-eth) on 2026-10-21T22:32:19Z. --- ### What Replace the `libSceJemspace` dummy entry with thirteen pending named exports: create/destroy, malloc/free, calloc, realloc, memalign, reallocalign, POSIX alignment, usable-size queries, statistics, purge, and statistics printing. Every name hashes exactly to a defined function NID in the module export table. Every declaration calls `NotImplemented_nid_no_patch`. The two added names match defined function entries: `sceJemspacePrintStats` → `4aop4GKLZaA`, `sceJemspacePurge` → `s686MsLMwns`. These are import-resolution entries only. The no-parameter declarations do not establish signatures or allocator behavior; this PR does not implement allocation, ownership, statistics, or title compatibility. The debt entry records these limitations, the unverified firmware version, and the unimplemented signatures and behavior of all thirteen declarations. ### Tested Revalidated on 2026-10-22 against `d6eafa54d` (`main`) after adding the two review-requested declarations. Both macOS architecture compile/export checks, the eight focused CTests, conventions and diff/privacy checks passed again. - macOS / AppleClang, arm64 and x86-64: compiled and linked the complete changed production source as an unsigned shared library with C++20, `-Wall -Wextra -Werror`, chained fixups, and `-Wno-return-type-c-linkage` for existing shared-header declarations. Runtime imports were left unresolved for this standalone build check. - Built upstream `nid_patcher` from the same checkout, patched both architecture builds, and used its exported-name reader to verify the exact thirteen expected NIDs with no missing or additional exports. - Progress audit: **0 implemented, 13 pending**. - CTest: `progress_report`, `progress_wrappers`, `conventions_unknown_nids`, `nid_database_cache`, `pr_overlap_exports`, `pr_overlap_wrapped_exports`, `conventions_doc_links`, and `conventions_pr_template` passed (8/8). - `python3 tools/check_conventions.py --base origin/main` and `git diff --check origin/main...HEAD` passed. - `python3 tools/pr_overlap.py --branch feat/jemspace-pending-exports --repo boykopovar/AnyPS5 --jobs 6` completed after the review update: no overlap with open pull requests. No full Linux/Windows build, allocator runtime test, title run, or console test is claimed. Linux/Windows compilation and full runtime integration remain unverified. GitHub conventions, intake, and label checks passed; these do not establish runtime or supported-platform build correctness. No symbol-only tests were added. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
fma-rc commented 2026-10-21 23:13:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-21T23:13:53Z.


The two exports the debt entry leaves unnamed have names that hash exactly: 4aop4GKLZaA is sceJemspacePrintStats and s686MsLMwns is sceJemspacePurge (compute_nid in tools/nid_names.py gives both). With them the PR can declare all 13 and drop the second debt bullet.

I built ee92ed2462 on Linux (Arch, GCC): the full build and the libs target pass with no warning from libSceJemspace/Export.cpp, and check_conventions.py --base origin/main passes. None of the 23 PS5 titles I have import libSceJemspace, so "Unblocks: none" holds here too.

One small thing: the stubs end right after NotImplemented_nid_no_patch(__func__);, while 6,137 of the stubs on main follow it with a return (about 13, mostly in libSceVideodec2, do not). Minor, and the maintainers can decide whether it matters.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6328655087 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9452#issuecomment-6328655087). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-21T23:13:53Z. --- The two exports the debt entry leaves unnamed have names that hash exactly: `4aop4GKLZaA` is `sceJemspacePrintStats` and `s686MsLMwns` is `sceJemspacePurge` (`compute_nid` in `tools/nid_names.py` gives both). With them the PR can declare all 13 and drop the second debt bullet. I built ee92ed2462 on Linux (Arch, GCC): the full build and the `libs` target pass with no warning from `libSceJemspace/Export.cpp`, and `check_conventions.py --base origin/main` passes. None of the 23 PS5 titles I have import `libSceJemspace`, so "Unblocks: none" holds here too. One small thing: the stubs end right after `NotImplemented_nid_no_patch(__func__);`, while 6,137 of the stubs on `main` follow it with a `return` (about 13, mostly in `libSceVideodec2`, do not). Minor, and the maintainers can decide whether it matters.
MarcZX10 commented 2026-10-22 04:35:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:35:46Z.

Review: DISMISSED


The eleven declarations are correctly framed as import-resolution stubs and the NID audit/build checks are documented. One concrete completeness issue surfaced in the open discussion: the two remaining export hashes are recoverable as sceJemspacePrintStats (4aop4GKLZaA) and sceJemspacePurge (s686MsLMwns). I verified both with this repository’s tools/nid_names.py compute_nid function. Please confirm these names against the module export table and, if they match as reported, include them as throwing declarations and revise the debt entry from 11+2 to 13 pending exports. Also, the checked head is based on a6dcea927, 47 commits behind current main (110a18ba01); rebase and rerun the NID/overlap/conventions and target build checks. I did not run a build.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609310187 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9452#pullrequestreview-5609310187). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T04:35:46Z. **Review:** DISMISSED --- The eleven declarations are correctly framed as import-resolution stubs and the NID audit/build checks are documented. One concrete completeness issue surfaced in the open discussion: the two remaining export hashes are recoverable as `sceJemspacePrintStats` (`4aop4GKLZaA`) and `sceJemspacePurge` (`s686MsLMwns`). I verified both with this repository’s `tools/nid_names.py` `compute_nid` function. Please confirm these names against the module export table and, if they match as reported, include them as throwing declarations and revise the debt entry from 11+2 to 13 pending exports. Also, the checked head is based on `a6dcea927`, 47 commits behind current main (`110a18ba01`); rebase and rerun the NID/overlap/conventions and target build checks. I did not run a build.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9452
No description provided.