feat(net): implement memory-pool netstat diagnostic #4785
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4785"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by krishalivaibhav on 2026-10-12T21:49:45Z.
What
Don't Starve Together (PPSA02070, 02.009.002) imports
sceNetShowNetstatWithMemory(H5WHYRfDkR0), which is absent and prevents its relinked executable from loading. Add the export with a pool-ID argument: reject unknown pools with the existing bad-descriptor error, then print the registered pool size and a snapshot of guest socket IDs, families, types and nonblocking/bound/listening flags. Copy the snapshot under the existing network mutex and perform output after releasing it.The socket registry has no pool association, so this is a global socket snapshot; it does not report per-pool usage, endpoints or console-exact formatting. The signature is inferred from the guest call site (one integer argument, ignored return), not verified against a console.
Tested
GuestSceNet.cppobjects compile. Fullguest_sce_net_testscannot build on this Mac because unchangedlibc/General.cppreferences Linux-onlyCLOCK_REALTIME_COARSEandstat.st_mtim; no unrelated portability changes are included.guest_sce_nettest exited 0. It checks diagnostic output for empty/live/closed sockets, a nonblocking bound listener, unchanged socket address after diagnostics, and invalid/destroyed pool errors. This is local functional evidence, not a passing clean-main suite.guest_sce_netwith exact PR head565fafa85merged onto main0c3dc9ca2(Windows 10, MinGW/WinLibs, Ninja). They did not run a no-fix negative control. This is a contributor test report, not formal approval or a result independently reproduced by this author.python3 tools/check_conventions.py --base origin/mainandgit diff --checkpass. Hosted full Linux/Windows jobs were skipped; they are not counted as passing. Clean Linux execution remains unverified.A minimal local implementation on an older macOS runtime allowed the game's missing import to bind and boot proceed to a separate unsupported vertex-subgroup failure. Later combined local candidates reached a logo/audio; gameplay was not verified, and that progress is not attributed to this export alone. This is not validation of the complete clean-main runtime.
Checklist
mainat584cc4c5716b02210ca031593d1a6b0b4ce049cbOpen networking PRs touch the same export/test files but implement different functions: #4758, #4673, #4669, #4614, #4613, #4612, #4611 and #4610. This change does not build on them.
#5349 changes stream-listen auto-binding and overlaps the shared test file. It is a separate behavior, not a dependency; resolve any textual overlap when either merges.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T21:50:06Z.
Progress report (
8a67eb2→565fafa)📈 System libraries: 87.87% (+0.01%, +1 implemented functions)
✅ 1 implemented
sceNetShowNetstatWithMemoryImported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T02:24:50Z.
Windows test: head
565fafa85merged onto currentmain0c3dc9ca2(clean merge, no conflicts). Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: full build 0 errors; ctest with the filterguest_sce_net: guest_sce_net passed (1 test(s), 0 failed);python tools/check_conventions.py --base upstream/mainpassed. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).