Skip to content

refactor(libs): name the libc and Json2 stubs the NID database resolves - #1145

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
reyani-dev:refactor/name-resolved-unknown-stubs
Oct 8, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
reyani-dev:refactor/name-resolved-unknown-stubs

Conversation

@reyani-dev

Copy link
Copy Markdown
Contributor

What

tools/nid_names.py resolves two unknown stubs that no open pull request touches. This renames them so the NIDs are unchanged and a NotImplemented failure names the real function:

Library NID Old New
libc u2tMGOLaqnE libcUnknown_u2tMGOLaqnE _ZSt14_Atomic_assertPKcS0_ (std::_Atomic_assert(const char*, const char*))
libSceJson2 6i18OJSvFWk sceJson2Unknown00 _ZN3sce4Json17InitParameterRttiC1EPNS0_14AllocParamRttiEPvm (sce::Json::InitParameterRtti::InitParameterRtti(AllocParamRtti*, void*, unsigned long))

Both names were checked with compute_nid(name) == nid. Behaviour is unchanged: both still call NotImplemented_nid_no_patch. They are not implemented here: the InitParameterRtti layout is unknown, and _Atomic_assert is a dead import of PPSA04029 (per the existing comment), so there is no call site to confirm its arguments.

The other rename-ready libc stubs (_Mtx_*, _Cnd_*, __powidf2, _WStoul, _Iswctype, vsnprintf_s, vsscanf_s) are left alone because #492 and #1128 already replace them.

Tested

python tools/nid_names.py no longer lists either NID. No local C++ toolchain on this machine, so the build is left to CI. No title tested.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Progress report (3c05400 → 42b88bf)

➖ System libraries: 86.13% (+0.0%, +2 declared, -2 removed functions)

🆕 2 declared as stubs
Library Name
libSceJson2 _ZN3sce4Json17InitParameterRttiC1EPNS0_14AllocParamRttiEPvm
libc _ZSt14_Atomic_assertPKcS0__nid_postfix
🗑️ 2 removed
Library Name
libSceJson2 sceJson2Unknown00
libc libcUnknown_u2tMGOLaqnE

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked both names with compute_nid (_ZSt14_Atomic_assertPKcS0_ → u2tMGOLaqnE, …InitParameterRttiC1EPNS0_14AllocParamRttiEPvm → 6i18OJSvFWk), build + ctest (424/424) on top of current main, and linux/windows CI on the head; behaviour is unchanged. Merging.

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.

2 participants