For |x| > 1, the infinities and NaN, titles' libc.prx stores EDOM and
raises FE_INVALID from acosf, quiet NaN included, and asinf also
raises FE_INVALID for a quiet NaN. acosf returned the same NaN bits
without either, and asinf set errno but raised nothing for a quiet NaN.
Both now call _Feraise with the invalid exception, which stores EDOM
and raises the flag in both units; the results are unchanged.
The acosf test asserted the old errno-preserving behaviour from a
FreeBSD reading; it now checks the titles' EDOM and FE_INVALID.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The explicit binary exponent stopped accumulating near 1e9 while the
digits add 4 per character without bound, so a subject with a few
hundred million digits was classified against the wrong exponent:
0x1 followed by 3e8 zeros and p-1200000005000 kept errno, and a long
zero fraction with p+1000000000000 underflowed instead of overflowing.
Saturate the explicit exponent at 2^62, beyond what any addressable
digit run can offset, so the sum never overflows or changes sign.
Record that _Stod and _Stodx follow the title libc.prx rule for
hexadecimal underflow, unverified for libSceLibcInternal.
Refs #9691
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep only the gaps: the rule is measured on one title-bundled libc.prx,
and on Linux glibc 2.35's strtod rounds some hexadecimal subnormal
results a unit low.
Refs #9691
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Classify hexadecimal strtod and wcstod input from its own digits rather
than a long double approximation. As measured on God of War Ragnarok's
bundled libc.prx, ERANGE is set only on overflow or when the exact value
is below 2^-1074, and a value between 2^-1075 and 2^-1074 becomes the
smallest subnormal only from 2^-1075 * (1 + 2^-52) up.
Refs #9691
Co-Authored-By: Claude Opus 5.5 <[email protected]>
rename and sceKernelRename now look the source up before they reject a
dot destination, as FreeBSD 11.4's kern_renameat does, so a missing
source onto dir/. fails with ENOENT. guest_filesystem covers it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
macOS numbers gif and stf 0x37 and 0x39, where FreeBSD uses 0xf0 and 0xd7, and
has types FreeBSD lacks such as IFT_CELLULAR. The macOS AF_LINK type now maps
like the Linux one: Ethernet, loopback and PPP keep their numbers and the
others report IFT_OTHER.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
getifaddrs listed each interface's AF_LINK entry only on Linux. On macOS the
entry now comes from the host's own AF_LINK sockaddr_dl and if_data: index,
type (macOS and FreeBSD share the IFT_ numbers), hardware address, header
length, MTU, metric, baud rate and counters, with the link state from
SIOCGIFMEDIA, or from IFF_UP and IFF_RUNNING for an interface without media.
The interfaces test checks the link-level entries against the host's on macOS
too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The only conflict was in GuestMath.cpp, where main's sinh tests and this
branch's asinh tests were inserted at the same place. Keep both: the asinh
checks follow the sinh ones.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The libc.prx that titles ship evaluates the rational step as
((Q(z) + g*P(z)) + 1) / ((Q(z) - g*P(z)) + 1), with its own ln 2 split
and coefficients in the double case, and returns 1 only for arguments
within half an epsilon of zero. main used a different rational form
with a doubling step and an epsilon-wide shortcut, which left about one
result in five one ulp away from titles.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Callers of ApplicationProcessParameters_nid_no_patch read the compiled SDK
version at offset 16 without a null check, so the null result for the
no-parameters record would crash them. The lookup now returns a static
zeroed 0x40-byte block for that record, and the heap recognises it by
address and keeps registering its default allocator.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
An ELF without a PT_SCE_PROCPARAM segment, such as a ps5-payload-dev
SDK program, had no .procpar section after relinking, so the first
allocation stopped with "process metadata is missing; relink the
executable".
The Windows relinker now writes a .procpar section that records no
parameters for such an ELF, and the application heap registers its
default allocator when it finds that record. An executable without
any .procpar section still gets the relink message.