pthread_attr_init, destroy, get and setdetachstate, get and setguardsize, getstacksize, get and setschedparam, pthread_equal, sched_yield, pthread_yield, pthread_setcancelstate and pthread_create_name_np had no test that ran them. The test checks the round trips, EINVAL for an invalid detach state or a null output, a destroyed attribute, the identity of thread handles, and the old state returned by pthread_setcancelstate. The default values the console reports are not pinned.
The PE and Mach-O NID patchers rewrite each sce import name in place with its 11-character NID, so the 10-character sceNetRecv and sceNetSend imports stopped the Windows build. libSceNet now exports GuestNetRecv_nid_no_patch and GuestNetSend_nid_no_patch, as libkernel does with GuestAlarm_nid_no_patch, and the two wrappers call those.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
guest_math_exact did not reach copysignl, sqrtl, lrintl, llrintl, lrintf,
llrintf, scalbf, scalblnf or __isinfl. It now checks copysignl with signed
zeros, sqrtl at -1 and -0, the four lrint forms at +-2.5 under each
rounding mode with errno untouched, scalbf with fractional, infinite and
NaN exponents, scalblnf clamping 64-bit exponents, and __isinfl.
freopen of an empty name on stdout fails with ENOENT as fopen of an empty name does, the guest stream is closed afterwards and the host standard output is still writable and still reaches its destination. Before the previous commit the call failed with EINVAL.
freopen skipped path resolution for an empty file name and handed it to the host, so the MS CRT answered EINVAL where FreeBSD's freopen, which opens the name and keeps that errno (lib/libc/stdio/freopen.c lines 153, 162 and 196), gives ENOENT, as fopen of an empty name already does. An empty name now fails like an unresolvable one: ENOENT, the guest stream is closed and a host standard stream is left as it was.
FreeBSD 11's kern_connectat fails a nonblocking connect that is still
connecting with EINPROGRESS (36), a second one while it is still
connecting with EALREADY, and soconnectat fails one on a connected
stream socket with EISCONN. On Windows connect has reported
WSAEWOULDBLOCK as EINPROGRESS since 79e162110, but the poll test still
accepted EAGAIN (35) and the socket error numbers debt entry still
listed the gap. Require 36 in the poll test and cut the stale sentence.
guest_strings checked the bounds-checked and BSD string functions but not
the plain C ones. It now checks strcmp, strncmp and strcoll by sign,
strlen, strcpy and strcat return values, strncpy zero padding and its
unterminated truncation, strstr with an empty needle, strspn, bcmp and
bzero.
guest_vector_algorithms ran one size of each MSVC-STL vector helper. It
now also runs __std_find_trivial 1, 4 and 8 (first match, or last when
there is none), __std_count_trivial 1, 2 and 4, __std_min_element 2, 4
and 8 and __std_max_element 1, 2 and 8. The min and max checks cover
signed against unsigned ordering, a tie (the first extreme is returned)
and an empty range.
Measured on a PS4 (firmware 10.71) for the review of the zone-shift
overflow: sceRtcFormatRFC2822 returns 0x80B50003 for UINT64_MAX with +1
and +1439 minutes and for 2^64 - 1 minute with +1, where the shifted tick
lands in year 1. The console returns 0x80B50008 when the shifted tick is
past 9999 as a signed value (2^63 with -1 minute) and otherwise 0x80B50003
when the source or the shifted tick is negative as a signed value
(2^63 with 0, 0 with -1); the tick after 9999 with -1 minute still formats.
sceRtcFormatRFC3339 does wrap on the console: UINT64_MAX with +1 minute
returns 0 and writes 0001-01-01T00:00:59.99+00:01, as the implementation
already does. Tests now cover both.
Written with AI assistance.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
d31e28308 made getdents and getdirentries throw on a name above the
one-byte d_namlen limit, and #8591 made getdirentries report the entry
index of its block through basep. The libkernel entry still described
ENAMETOOLONG and a basep of 0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
guest_dinkumware_atomics called one or two sizes of each typed _Atomic_
function. It now also runs the other sizes: store 2 and 4, load 1,
exchange 1 and 2, strong compare-exchange 1, 4 and 8 and weak 1 and 2
(a failure writes the observed value back, then a success swaps), fetch_sub
1 and 8, fetch_and 1, 2 and 8, fetch_or 2, 4 and 8, fetch_xor 1, 2 and 4
(each returns the previous value, with wraparound), and is_lock_free 1, 2
and 8.
Measured on a PS4 (firmware 10.71) with an OpenOrbis homebrew that loads a
probe PRX calling libSceRtc; every output starts as a sentinel, so stores
and their width are visible.
- sceRtcSetTime_t takes the low 32 bits of its argument as unsigned seconds
and returns 0 for every value: -1 is 2106-02-07 06:28:15, 2^32 + 1 is
1970-01-01 00:00:01 and -2^31 is 2038-01-19 03:14:08. sceRtcGetTime_t
stays 64-bit (2106-02-07 06:28:16 is 2^32).
- sceRtcGetTime_t before 1970 and sceRtcGetWin32FileTime before 1601 store
0 and return 0x80B50008. Field validation still comes first and leaves
the output unchanged (1969-13-01 returns 0x80B50009).
- sceRtcSetTick and sceRtcSetWin32FileTime have no upper limit: the tick
after 9999-12-31 23:59:59.999999 is 10000-01-01 and the file time
2^64 - 1 is 60056-05-28 05:36:10.955161. sceRtcGetDayOfWeek accepts
years past 9999 (10000-01-01 is 6).
- sceRtcFormatRFC3339 returns 0x80B50008 when the zone-shifted tick is
outside years 1 to 9999. sceRtcFormatRFC2822 returns 0x80B50003 when it
is negative as a signed value and 0x80B50008 when it is past 9999.
The PS5-measured cases of GuestRtc.cpp that the probe repeated (RFC 3339
and RFC 2822 parsing, named and military zones, DOS time, TickAdd) give the
same results on the PS4. The three expectations changed here (SetTick past
9999, SetTime_t(-1), RFC 2822 at the limit with +1 minute) came from
commits that cite no measurement. Not yet confirmed on PS5.
Written with AI assistance.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceNpCheckNpAvailabilityA, sceNpGetAccountLanguageA,
sceNpGetParentalControlInfoA and sceNpGetAccountDateOfBirthA return
SIGNED_OUT without writing, like sceNpGetAccountCountryA. The game
presence queries report OFFLINE. A null pointer or user id -1 is
INVALID_ARGUMENT, and the request forms refuse request id 0 and an
unknown request as sceNpSetGamePresenceOnline does. Signatures and
checks follow shadPS4 and Orbital; sceNpIsPlusMember keeps throwing.
Validate the configuration and resource information as
sceVideodecCreateDecoder does, map the configuration the same way and
report the memory and frame buffer requirements that
sceVideodec2QueryDecoderMemoryInfo gives for it.