Repository navigation
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The exact-head change uses the existing checked guest-memory copy helper to return EFAULT for an unwritable buffer, and the reported regression test distinguishes this from the crash on the base behavior.
What I ran
Reviewed head e65a480a7840a82578cef06f035107b76cbb1043 against PR base de83e8f27015b91327029755f1ea5b60b74d940b. GitHub reports the PR open and mergeable. Environment: Debian 12 x86-64, Python 3.11.2, GCC 12.2.0. No project build or local C++ test was run.
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13794
git diff --check de83e8f27015b91327029755f1ea5b60b74d940b...e65a480a7840a82578cef06f035107b76cbb1043
python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base de83e8f27015b91327029755f1ea5b60b74d940b --head e65a480a7840a82578cef06f035107b76cbb1043 --json
python3 tools/pr_test_quality.py --root /tmp/anyps5-review-13794 --json core/libs/tests/GuestHostname.cpp
gh pr checks 13794 --repo boykopovar/AnyPS5Results
| Check | Result |
|---|---|
| Diff and conventions | Passed. |
| Export ABI audit | Passed with no findings; the existing gethostname_nid_postfix declaration and definition remain consistent. |
| Test registration | The heuristic warned that GuestHostname.cpp might be unregistered; exact-head CMake explicitly builds and registers guest_hostname. False positive. |
| Hosted CI | Windows, conventions, library-portability, intake, labels, eligibility, report, Ubuntu relinker, Windows relinker, Ubuntu register-context, and relinker-asan passed. The Windows job compiled the libraries but its changed-test selector reported no guest test source changed. Linux was skipped; macOS relinker, register-context, and write-watch jobs were still queued. |
| Author-reported focused test | The PR description reports Linux x86-64 guest_hostname passing 3/3 and a negative control that crashes on unmodified main. It does not state the tested SHA; I did not independently reproduce it. |
| Local build / C++ tests | Not run; initial review checks do not build. |
Unedited output excerpts
All conventions checks passed.
{
"status": "passed",
"symbols": [
{
"name": "gethostname_nid_postfix",
"computed_nid": "-nvxBWa0iDs",
"declarations": [
"core/libs/prx/libc/include/Api.hpp"
],
"definitions": [
"core/libs/prx/libc/src/Hostname.cpp"
],
"explicit_aliases": [],
"version": "not encoded by these source declarations; not verified"
}
],
"findings": [],
"limitations": [
"This lexical audit does not parse C++ fully, prove calling-convention or binary ABI correctness, verify runtime version tables, or replace compilation.",
"An absent source declaration or explicit alias can be intentional for assembly exports, conditional platform code, or generated interfaces; inspect findings before treating them as defects."
]
}No guest core/libs test sources changed
No guest core/libs test sources changed; the libs build still ran
windows pass 7m27s https://github.com/boykopovar/AnyPS5/actions/runs/41178585218/job/124471183544
linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41178585218/job/124471184488
relinker (macos-latest, clang++) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41178585218/job/124471183560
write-watch (macos-15) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41178585218/job/124471183687
git diff --check produced no output and exited 0.
Negative control
| Assertion | Change used as the control | Result |
|---|---|---|
An unwritable output buffer returns -1/EFAULT rather than crashing |
The PR description reports running the same invalid-pointer case against unmodified main and the PR change |
Author reports main crashed with SIGSEGV and the change returned -1 with errno 14; not independently reproduced, and the tested SHA was not stated. |
Findings
Blocking
None found in the reviewed source or available checks.
Non-blocking
The Linux focused test and negative control are author-reported without a tested SHA. Windows CI compiled the changed library, but its test-selection step did not run the changed guest test. The macOS jobs were pending at the final refresh, and Linux product CI was skipped.
Sources
- gethostname implementation at the reviewed head
- checked guest copy helper at the reviewed head
- regression assertion at the reviewed head
- guest test registration at the reviewed head
Not verified
No local project build, local C++ run, macOS test, Linux hosted product test, or console behavior was verified. Author-reported Linux results are not independently reproduced.
e65a480 to
206d4b3
Compare
|
Verified head What I checked
Test runs
Negative controlReverted only the FindingsNone. The change is generic, uses the existing checked copy helper, keeps the FreeBSD-following behavior otherwise, and the debt file documents the unmeasured console behavior. No AGC/shader surface involved, so no GPU limitation applies to this PR. |
|
A Windows run with GCC 16: Windows 11 Pro 10.0.22631, i9-9900K, MSYS2 UCRT64 GCC 16.1.0, Release, this PR (
AI-assisted: yes (Claude Code) |
|
@DeveshB-1 the code looks good to me and the tests are solid (blawesom's Linux run and bunbeans2-arch's Windows run both show the fault without the fix). It needs one thing: a rebase onto main, since the PR is conflicting and labelled needs rebase. Please push the rebased head so it can be reviewed on it. |
|
I am closing this for now. The branch conflicts with main and there has been no push since 31 Oct, so it needs a rebase and a fresh run of the hostname test. Feel free to reopen or push a rebased branch at any time and we will look at it again. |
What
Safely copy the hostname in
gethostnameusingGuestCopyOut_nid_no_patchso that an unwritable output buffer returns-1witherrno14 (EFAULT) instead of crashing the host process withSIGSEGV.Tested
Linux x86_64 (AMD Ryzen 7 7730U):
guest_hostnamepasses 3 of 3 (ctest --test-dir build -R '^guest_hostname$' --repeat until-fail:3 -V).main, passing an unwritable pointer togethostnamecrashes deterministically withSIGSEGV(***Exception: SegFault 0.08 sec). With this fix applied, it safely returns-1witherrno14 (EFAULT).python3 tools/check_conventions.py --base origin/mainreports zero findings.python3 tools/pr_overlap.py --branch fix/gethostname-efaultreports no conflicting open pull requests implementing the same functions.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)