Skip to content

feat(libSceAddressSanitizer): add skeleton library and 301 ps5rs-listed stubs - #12106

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
PrivacyOnion:feat/addresssanitizer-declarations-ps5rs
Oct 28, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
PrivacyOnion:feat/addresssanitizer-declarations-ps5rs

Conversation

@PrivacyOnion

Copy link
Copy Markdown
Contributor

What

  • Add skeleton library libSceAddressSanitizer declaring 301 export stubs derived from claimore22/ps5rs (data/stubs/by_library/libSceAddressSanitizer_nosubmission.txt, commit 5f252a658ff470bcb2b6cd15205fd8ca64ae4477).
  • All 301 export names have their NID verified via tools/nid_names.py compute_nid.
  • Provide canonical public headers (core/libs/prx/libSceAddressSanitizer/libSceAddressSanitizer.hpp and core/libs/prx/libSceAddressSanitizer/include/Api.hpp) satisfying test_public_headers.py.
  • Record unknown signatures, parameter layouts, and runtime behavior in docs/dev/debt/libSceAddressSanitizer.md; each stub throws NotImplemented_nid_no_patch.

Tested

  • Passed python core/libs/tests/test_public_headers.py --audit-only on Windows 11.
  • Passed python tools/check_conventions.py --base origin/main.

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

@github-actions

Copy link
Copy Markdown

Progress report (4a60059 → 312c586)

📉 System libraries: 47.72% (-1.06%, +301 declared functions)

🆕 301 declared as stubs
Library Name
libSceAddressSanitizer __asan_addr_is_in_fake_stack
libSceAddressSanitizer __asan_address_is_poisoned
libSceAddressSanitizer __asan_after_dynamic_init
libSceAddressSanitizer __asan_aligned_alloc
libSceAddressSanitizer __asan_alloca_poison
libSceAddressSanitizer __asan_allocas_unpoison
libSceAddressSanitizer __asan_before_dynamic_init
libSceAddressSanitizer __asan_calloc
libSceAddressSanitizer __asan_current_error_report
libSceAddressSanitizer __asan_current_error_report_size
libSceAddressSanitizer __asan_describe_address
libSceAddressSanitizer __asan_destroy_fake_stack
libSceAddressSanitizer __asan_exp_load1
libSceAddressSanitizer __asan_exp_load16
libSceAddressSanitizer __asan_exp_load16_noabort
libSceAddressSanitizer __asan_exp_load1_noabort
libSceAddressSanitizer __asan_exp_load2
libSceAddressSanitizer __asan_exp_load2_noabort
libSceAddressSanitizer __asan_exp_load4
libSceAddressSanitizer __asan_exp_load4_noabort
libSceAddressSanitizer __asan_exp_load8
libSceAddressSanitizer __asan_exp_load8_noabort
libSceAddressSanitizer __asan_exp_loadN
libSceAddressSanitizer __asan_exp_loadN_noabort
libSceAddressSanitizer __asan_exp_store1
libSceAddressSanitizer __asan_exp_store16
libSceAddressSanitizer __asan_exp_store16_noabort
libSceAddressSanitizer __asan_exp_store1_noabort
libSceAddressSanitizer __asan_exp_store2
libSceAddressSanitizer __asan_exp_store2_noabort
libSceAddressSanitizer __asan_exp_store4
libSceAddressSanitizer __asan_exp_store4_noabort
libSceAddressSanitizer __asan_exp_store8
libSceAddressSanitizer __asan_exp_store8_noabort
libSceAddressSanitizer __asan_exp_storeN
libSceAddressSanitizer __asan_exp_storeN_noabort
libSceAddressSanitizer __asan_free
libSceAddressSanitizer __asan_get_alloc_stack
libSceAddressSanitizer __asan_get_current_fake_stack
libSceAddressSanitizer __asan_get_free_stack
libSceAddressSanitizer __asan_get_report_access_size
libSceAddressSanitizer __asan_get_report_access_type
libSceAddressSanitizer __asan_get_report_address
libSceAddressSanitizer __asan_get_report_bp
libSceAddressSanitizer __asan_get_report_description
libSceAddressSanitizer __asan_get_report_pc
libSceAddressSanitizer __asan_get_report_sp
libSceAddressSanitizer __asan_get_shadow_mapping
libSceAddressSanitizer __asan_handle_no_return
libSceAddressSanitizer __asan_init
libSceAddressSanitizer __asan_init_v5
libSceAddressSanitizer __asan_load1
libSceAddressSanitizer __asan_load16
libSceAddressSanitizer __asan_load16_noabort
libSceAddressSanitizer __asan_load1_noabort
libSceAddressSanitizer __asan_load2
libSceAddressSanitizer __asan_load2_noabort
libSceAddressSanitizer __asan_load4
libSceAddressSanitizer __asan_load4_noabort
libSceAddressSanitizer __asan_load8
libSceAddressSanitizer __asan_load8_noabort
libSceAddressSanitizer __asan_loadN
libSceAddressSanitizer __asan_loadN_noabort
libSceAddressSanitizer __asan_load_cxx_array_cookie
libSceAddressSanitizer __asan_locate_address
libSceAddressSanitizer __asan_malloc
libSceAddressSanitizer __asan_malloc_stats
libSceAddressSanitizer __asan_malloc_usable_size
libSceAddressSanitizer __asan_memalign
libSceAddressSanitizer __asan_memcpy
libSceAddressSanitizer __asan_memmove
libSceAddressSanitizer __asan_memset
libSceAddressSanitizer __asan_option_detect_stack_use_after_return
libSceAddressSanitizer __asan_poison_cxx_array_cookie
libSceAddressSanitizer __asan_poison_intra_object_redzone
libSceAddressSanitizer __asan_poison_memory_region
libSceAddressSanitizer __asan_poison_stack_memory
libSceAddressSanitizer __asan_posix_memalign
libSceAddressSanitizer __asan_print_accumulated_stats
libSceAddressSanitizer __asan_realloc
libSceAddressSanitizer __asan_reallocalign
libSceAddressSanitizer __asan_region_is_poisoned
libSceAddressSanitizer __asan_register_elf_globals
libSceAddressSanitizer __asan_register_globals
libSceAddressSanitizer __asan_register_image_globals
libSceAddressSanitizer __asan_report_error
libSceAddressSanitizer __asan_report_exp_load1
libSceAddressSanitizer __asan_report_exp_load16
libSceAddressSanitizer __asan_report_exp_load16_noabort
libSceAddressSanitizer __asan_report_exp_load1_noabort
libSceAddressSanitizer __asan_report_exp_load2
libSceAddressSanitizer __asan_report_exp_load2_noabort
libSceAddressSanitizer __asan_report_exp_load4
libSceAddressSanitizer __asan_report_exp_load4_noabort
libSceAddressSanitizer __asan_report_exp_load8
libSceAddressSanitizer __asan_report_exp_load8_noabort
libSceAddressSanitizer __asan_report_exp_load_n
libSceAddressSanitizer __asan_report_exp_load_n_noabort
libSceAddressSanitizer __asan_report_exp_store1
libSceAddressSanitizer __asan_report_exp_store16
... 201 more

Changed libraries (implemented exports)

Library Before After Change
libSceAddressSanitizer Not present 0/301 (0.00%) n/a

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 312c586d8b931cc42efc5ba4544809fb4c08cf68. Independent checks: the pinned ps5rs list and Export.cpp each contain exactly 301 names; tools/nid_names.py computes every listed NID with zero mismatches; the public-header audit reports 369 libraries and 13,120 exports with unique declarations and umbrella coverage; Export.cpp passes C++20 syntax-only compilation; and the merge preview against current main is clean. Hosted policy checks pass; the Windows build is still running.\n\nOne scope question before treating this as a resolution of #12063: that issue names libSceDbgAddressSanitizer, while this PR adds libSceAddressSanitizer and does not add a ModuleTable.hpp mapping. The seven exports identified in the issue overlap this inventory, but the 301 throwing stubs do not provide usable ASan behavior: even __asan_init and instrumented load/store calls throw. That is consistent with the repository’s rule for unknown exports, but it only helps import resolution if this exact library name is what the loader expects. Could you clarify the evidence tying this library name to the target import/module path, and whether this PR is intended to address any part of #12063? The issue’s proposed silent or functional runtime paths are separate from the throwing skeleton here.

@PrivacyOnion

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Thanks for the thorough review and checks!

To clarify: this PR is scoped strictly as an import-resolution throwing skeleton derived from the pinned ps5rs module list (libSceAddressSanitizer_nosubmission.txt, following the exact pattern of #10697). It is not intended to resolve #12063 or claim runtime ASan behavior / silent stubs.

The evidence for libSceAddressSanitizer comes directly from the retail module list in ps5rs, whereas #12063 specifically discusses libSceDbgAddressSanitizer runtime hooks. Keeping them decoupled ensures proper NID/export cataloging without conflating it with the functional runtime work tracked in #12063.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up on the scope clarification: I agree this is an import-resolution skeleton for libSceAddressSanitizer, separate from the libSceDbgAddressSanitizer runtime work in #12063. I independently rechecked the exact head 312c586d8b931cc42efc5ba4544809fb4c08cf68: all 301 declarations have matching definitions, both name sets are unique, the public-header audit passes (368 libraries / 12,822 exports), conventions and git diff --check pass, the current-main merge preview is clean, and hosted Windows succeeds. I did not independently rerun the pinned ps5rs NID computation in this pass; the PR body records it as checked. No blocking issue found in this scope. The only hosted build job shown is Windows; Linux and macOS build jobs were skipped by workflow selection, so this is not a claim of cross-platform validation.

MarcZX10

This comment was marked as low quality.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The change is scoped to the AddressSanitizer skeleton and its declared stub exports; the inventory and generated NID declarations were checked on this head. Windows hosted configure/link and convention, intake, eligibility, and report checks pass; CTest and Linux were skipped.

Reviewed head 312c586 against base 4a60059; no blocking finding. This approval covers this exact diff.

@adriadam10
adriadam10 merged commit 8bcd771 into boykopovar:main Oct 28, 2026
11 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Merged: 301 export stubs all throw NotImplemented_nid_no_patch, headers and debt entry present, definitions match declarations, Conventions and Windows green; merged.

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.

3 participants