Commit Graph
9 Commits
Author SHA1 Message Date
Adrià 5e936063e3 Merge pull request #13871 from zaryabzip/fix/rudp-context-status-checks
fix(libSceRudp): check the context status arguments first and initialization before the id pointer
2026-11-01 06:06:40 +01:00
zaryabzip e70388ccd5 fix(libSceRudp): compare the context status size as 64 bits
A firmware 13.42 run of the module refuses a size of 0x100000010, which a
32-bit parameter would cut to 0x10 and accept.
2026-10-31 19:42:42 +05:00
zaryabzip 553f1a82d2 fix(libSceRudp): check the context status arguments first and initialization before the id pointer
sceRudpGetContextStatus refuses a negative id, a null status and a size
outside 1 to 0x30 with 0x80770004 before it looks the id up, and writes
the idle block with 0xFFFFFFFF at bytes 4-7, as firmware 10.71 and 13.42
readings show. sceRudpCreateContext checks initialization before its null
id pointer.
2026-10-31 14:18:54 +05:00
zaryabzip 11f42d025e feat(libSceRudp): bind, listen and accept as a firmware 13.42 run shows
sceRudpBind takes the socket id, virtual port and mux mode and checks
them; mux mode 2 with vport 0 takes 0x2711 and on from a per-socket
counter. sceRudpSetEventHandler checks initialization and a null
handler, and sceRudpEnd clears the handler. sceRudpListen and
sceRudpAccept follow the run: no peer ever connects here, so accept
returns WOULDBLOCK while non-blocking and otherwise waits until the
context is terminated. Cases the run did not cover throw.
2026-10-31 12:11:58 +05:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
boykopovar 08fa5d3578 fix(rudp): validate activation and reject unsupported transport 2026-10-21 21:50:36 +03:00
Felipebmaitan b122786155 fix(libSceRudp): accept setters for unreadable options 2026-10-20 21:41:57 -03:00
Felipebmaitan a473096926 feat(libSceRudp): retain and query context options 2026-10-20 21:41:04 -03:00
alosta 14db22d458 test(libSceRudp): add GuestRudpContextLifecycle behavioral tests
Adds tests for nine implemented libSceRudp functions that previously
lacked coverage:

- sceRudpActivate (returns 0 always)
- sceRudpEnableInternalIOThread (NOT_INITIALIZED before init, 0 after)
- sceRudpSetEventHandler (returns 0)
- sceRudpBind (NOT_INITIALIZED, INVALID_CONTEXT_ID, 0 on success)
- sceRudpSetOption (NOT_INITIALIZED, INVALID_CONTEXT_ID, 0 on success)
- sceRudpInitiate (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_REFUSED)
- sceRudpGetContextStatus (NOT_INITIALIZED, INVALID_CONTEXT_ID, fills
  status with 0, null status allowed)
- sceRudpWrite (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_RESET)
- sceRudpRead (NOT_INITIALIZED, INVALID_CONTEXT_ID, CONN_RESET)

Each assertion mirrors the exact implementation in Export.cpp. Error
codes and return values are the constants hardcoded in the source.
No console measurement needed — these are pure offline behaviors.

AI-assisted: yes
2026-10-17 17:35:07 +01:00