feat(libwebrtc): implement SocketAddress copy operations #17705

Merged
alvaroelpob merged 8 commits from upstream-pr/17705 into main 2026-11-22 07:18:08 +00:00
alvaroelpob commented 2026-11-09 11:14:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-11-09T11:14:38Z.


What

Implement rtc::SocketAddress copy construction and copy assignment, including deep copies of inline and heap-backed guest hostnames.

Tested

Linux: suite.py feat/libwebrtc-socket-address-copy at 454be8c51f: CTest 6575/6575 passed; conventions passed.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5222961723 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17705). Originally posted by [alvaroelpob](https://github.com/alvaroelpob) on 2026-11-09T11:14:38Z. --- ### What Implement rtc::SocketAddress copy construction and copy assignment, including deep copies of inline and heap-backed guest hostnames. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Linux: `suite.py feat/libwebrtc-socket-address-copy` at 454be8c51f: CTest 6575/6575 passed; conventions passed. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-17 22:35:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T22:35:15Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head reviewed: e2f7abfa1d2a1d9a41e6f1493838110cfad0a6f3, base main.
  • Read the description, commits, manifest and diff from the review folder, then checked names and headers at the head with the reader (repo_read.py).
  • No build and no test run in this review. The reader only reads the repository; it cannot compile.
Reader commands
python3 repo_read.py search WebRtcGuestStringInlineCapacity
python3 repo_read.py search SocketAddressaSERKS0_
python3 repo_read.py cat core/libs/prx/libwebrtc/src/SocketAddress.cpp 1 60
python3 repo_read.py search GuestStringStorage.hpp
python3 repo_read.py cat core/libs/prx/libwebrtc/include/GuestString.hpp 1 40
python3 repo_read.py cat core/libs/prx/libwebrtc/include/SocketAddress.hpp 1 22

Results

Check Result Note
Diff read, all 7 files passed Every changed hunk read
Names and headers at head passed Guest string storage, guest string and socket address headers found
Build and CTest not run No build in this run
Author's CTest report not verified Names e5cb560ec3, not this head

Findings

Blocking

None.

Non-blocking

  • The copy and assignment paths in core/libs/prx/libwebrtc/src/SocketAddressCopy.cpp:100 and :108 throw on null arguments, but the tests in core/libs/prx/libwebrtc/tests/SocketAddressCopy.cpp never call them with null. A test for the throw would cover that branch.
  • Data() at core/libs/prx/libwebrtc/src/SocketAddressCopy.cpp:55 repeats WebRtcGuestStringData from core/libs/prx/libwebrtc/include/GuestString.hpp, with a non-const signature. Same pattern as LogMessage.cpp, so this is only a style note.

Not verified

  • The build, the CTest run and the new test guest_webrtc_socket_address_copy on this head.
  • The exact revision: the author's report names e5cb560ec3, and the head is e2f7abfa1d.
  • The dependency list (13 PRs) and "based on current main": not checked against the repository.
  • Console behaviour: the layout, the ip_ vtable word and the hostname allocation are unmeasured, as docs/dev/debt/libwebrtc.md already says.
  • Full text of the changed files was not read. The review covers the changed hunks and the headers they use; files/ was not opened.

Files read: the 7 files in files.json under reviewed, through their diff. Excluded by rule: none.

To get this to a good state

Nothing is required. Optional:

  • Rerun suite.py on e2f7abfa1d2a1d9a41e6f1493838110cfad0a6f3 and update the Tested line, which names e5cb560ec3.
  • Add a null-argument test for both operations.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5947782217 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17705#pullrequestreview-5947782217). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T22:35:15Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head reviewed: `e2f7abfa1d2a1d9a41e6f1493838110cfad0a6f3`, base `main`. - Read the description, commits, manifest and diff from the review folder, then checked names and headers at the head with the reader (`repo_read.py`). - No build and no test run in this review. The reader only reads the repository; it cannot compile. <details> <summary>Reader commands</summary> ``` python3 repo_read.py search WebRtcGuestStringInlineCapacity python3 repo_read.py search SocketAddressaSERKS0_ python3 repo_read.py cat core/libs/prx/libwebrtc/src/SocketAddress.cpp 1 60 python3 repo_read.py search GuestStringStorage.hpp python3 repo_read.py cat core/libs/prx/libwebrtc/include/GuestString.hpp 1 40 python3 repo_read.py cat core/libs/prx/libwebrtc/include/SocketAddress.hpp 1 22 ``` </details> ## Results | Check | Result | Note | | --- | --- | --- | | Diff read, all 7 files | passed | Every changed hunk read | | Names and headers at head | passed | Guest string storage, guest string and socket address headers found | | Build and CTest | not run | No build in this run | | Author's CTest report | not verified | Names `e5cb560ec3`, not this head | ## Findings ### Blocking None. ### Non-blocking - The copy and assignment paths in `core/libs/prx/libwebrtc/src/SocketAddressCopy.cpp:100` and `:108` throw on null arguments, but the tests in `core/libs/prx/libwebrtc/tests/SocketAddressCopy.cpp` never call them with null. A test for the throw would cover that branch. - `Data()` at `core/libs/prx/libwebrtc/src/SocketAddressCopy.cpp:55` repeats `WebRtcGuestStringData` from `core/libs/prx/libwebrtc/include/GuestString.hpp`, with a non-const signature. Same pattern as `LogMessage.cpp`, so this is only a style note. ## Not verified - The build, the CTest run and the new test `guest_webrtc_socket_address_copy` on this head. - The exact revision: the author's report names `e5cb560ec3`, and the head is `e2f7abfa1d`. - The dependency list (13 PRs) and "based on current `main`": not checked against the repository. - Console behaviour: the layout, the `ip_` vtable word and the hostname allocation are unmeasured, as `docs/dev/debt/libwebrtc.md` already says. - Full text of the changed files was not read. The review covers the changed hunks and the headers they use; `files/` was not opened. Files read: the 7 files in `files.json` under `reviewed`, through their diff. Excluded by rule: none. ## To get this to a good state Nothing is required. Optional: - Rerun `suite.py` on `e2f7abfa1d2a1d9a41e6f1493838110cfad0a6f3` and update the Tested line, which names `e5cb560ec3`. - Add a null-argument test for both operations.
MarcZX10 commented 2026-11-22 06:52:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T06:52:00Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this review; the points below are optional.

What I ran

Reviewed head 454be8c51f3280cd43a474cac8d8858a2536f5bf using the prepared diff and repo_read.py. I did not run commands or tests. The PR description reports Linux CTest 6575/6575 and conventions passed; that result was not independently verified.

Results

Check Result Note
Changed code review passed Implementation and tests read
Tests not run PR-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

Read all seven changed files listed in the manifest: CMakeLists.txt, Export.cpp, Api.hpp, SocketAddress.hpp, SocketAddressCopy.cpp, tests/SocketAddressCopy.cpp, and the two debt fragments (eight paths total). The prepared diff and targeted context were inspected; the other unchanged repository files were not read. No local tests or physical-console checks were run.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6010871224 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17705#pullrequestreview-6010871224). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T06:52:00Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this review; the points below are optional. ## What I ran Reviewed head `454be8c51f3280cd43a474cac8d8858a2536f5bf` using the prepared diff and `repo_read.py`. I did not run commands or tests. The PR description reports Linux CTest 6575/6575 and conventions passed; that result was not independently verified. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Implementation and tests read | | Tests | not run | PR-reported results only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Read all seven changed files listed in the manifest: `CMakeLists.txt`, `Export.cpp`, `Api.hpp`, `SocketAddress.hpp`, `SocketAddressCopy.cpp`, `tests/SocketAddressCopy.cpp`, and the two debt fragments (eight paths total). The prepared diff and targeted context were inspected; the other unchanged repository files were not read. No local tests or physical-console checks were run. ## To get this to a good state Nothing is required.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!17705
No description provided.