Repository navigation
Conversation
Homebrew that links FreeBSD's inet_addr imports __inet_addr from libSceLibcInternal and fails to load without it. The parser follows FreeBSD's inet_aton instead of the host's, whose overflow checks differ, and returns INADDR_NONE for invalid input. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing as a duplicate of #1972, which was opened first and implements the same |
9 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three homebrew apps from the PS5 homebrew catalog stop at load on
mainf145139: XashPS5 (PPSA19111 1.3), RetroArch (PPSA99169 1.0.0-beta.1) and Porpoise (PPSA99764 2.7).7p7kTAJcuGgis__inet_addr, imported fromlibSceLibcInternal. FreeBSD's libc exportsinet_addrunder that name too (__weak_reference(__inet_addr, inet_addr)), and nothing provides it yet. RetroArch and Porpoise were also reported stopping there in #1578.This adds
__inet_addrto libc, followinginet_addrandinet_atonin FreeBSD'slib/libc/inet/inet_addr.c:0) or hex (0x); the last part fills the remaining bytes, so127.1is127.0.0.1;INADDR_NONE(0xffffffff) for invalid input, so255.255.255.255and an error look the same, as on FreeBSD;4294967297gives0.0.0.1), like FreeBSD. glibc rejects it, so the host'sinet_addris not used.#1766 added
__inet_addrand__inet_ntoathrough the host's functions and was closed because no title stopped on them yet; LeandroLP23 later asked to reopen it when RetroArch and Porpoise were seen stopping here. This PR is__inet_addralone;__inet_ntoa, the next stop, follows in its own PR. #1848 (__inet_aton) follows the same FreeBSD function; the two merge without conflicts.Tested
CachyOS Linux, GCC 16.2.1, Release, RTX 4070 Ti (NVIDIA 615.71.09) and Radeon 610M (RADV, Mesa 26.2.4):
-nvxBWa0iDs(gethostname), RetroArch and Porpoise at6i5aLrxRhG0(__inet_ntoa).guest_stringshas new checks: the four address forms, hex and octal parts, the largest last part of each form, trailing whitespace,255.255.255.255, and 15 invalid inputs (an empty string, a leading space, five parts, parts out of range,08,1..2, letters, trailing garbage, a bare0x, a trailing dot, a sign).tools/check_conventions.pyandgit diff --checkpass.Not tested on Windows or on a console. The behaviour comes from FreeBSD's source and was not measured on a PS5.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code