Skip to content

feat(libSceNpMatching2): refuse a null sceNpMatching2SendRoomMessage parameter before initialization - #16109

Open
MarrasFederico wants to merge 1 commit into
boykopovar:mainfrom
MarrasFederico:feat/np-matching2-send-room-message-null-param
Open

MarrasFederico wants to merge 1 commit into
boykopovar:mainfrom
MarrasFederico:feat/np-matching2-send-room-message-null-param

Conversation

@MarrasFederico

@MarrasFederico MarrasFederico commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What

sceNpMatching2SendRoomMessage threw for every call. Firmware 13.42, run natively in #12623, refused a null parameter with INVALID_ARGUMENT (0x80550C0A) even before sceNpMatching2Initialize, where every other request returns NOT_INITIALIZED (0x80550C03) first.

The export now does exactly that: a null request returns INVALID_ARGUMENT whether or not the library is initialized, and a non-null request before initialization returns NOT_INITIALIZED. Anything else still throws: the run never got past the parameter's own checks, so they and the accepted path are unknown. The request id and the context are not checked, because their place in the order was not measured.

Not measured on a console.

Tested

Ubuntu 26.04.1, kernel 7.0.0, GCC 15.2.0, Release, BUILD_TESTING=ON, on main 6e6dae4e8b. Windows and macOS were not compiled here. No title was run.

  • guest_np_matching2_offline passes. New cases: a null request before initialization, with and without a request id; a non-null request before initialization and after termination; a null request on a created and an unknown context.
  • Main's body (an unconditional throw) aborts the new test. Swapping the two checks fails at a null request before initialization did not return INVALID_ARGUMENT; restoring them passes.
  • check_conventions.py --base upstream/main passes.
  • pr_overlap.py: no overlap beyond #14212, which only respaces the debt file. My #16108 adds its debt line and tests in the same spots, so whichever merges second needs a trivial merge.

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

This branch has not been deployed

No deployments
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