With symbolic links allowed on Windows, guest_file_timestamps hung until
the CTest timeout: its link.txt is dangling (the relative target resolves
beside the link), MinGW's std::filesystem::remove_all reads links through
stat, sees it as absent and spins on a directory it cannot empty. The
test now removes the link with unlink_nid_postfix first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main took request serialization version 48 for the fragment barycentric
built-ins flag (#9193). The depth export clamp bounds are now written at
version 49 and read only for versions from 49, so a version 48 request as main
writes it still decodes, with default bounds. Tests: version 49 is the
emitted prefix, 50 the first unsupported one, a depth exporting request
without its bounds decodes at 48, 47 and 46 (the last two without main's
barycentric byte), and a version 48 two-sample dithered request decodes as
written.
scePthreadMutexattrSetkind called NotImplemented_nid_no_patch for a kind
outside 1 to 4. Firmware 13.42's libkernel, run in an emulator, makes it
call pthread_mutexattr_setkind_np, which stores any kind as a signed
16-bit value and returns 0, and turns a null attribute's -1 with errno 22
into 0x8001FFFF. It now forwards to pthread_mutexattr_setkind_np and
converts the result with sceKernelError, so a null attribute or object
still returns 0x8001FFFF and now also sets errno 22.
An out-of-range kind is refused by scePthreadMutexInit with 0x80020016,
leaving the mutex untouched, as measured for the same module.
scePthreadMutexattrGetkind is unchanged; kind 0 now reaches it and
returns 0.
With symbolic links allowed on Windows, guest_kernel_sys failed at its
cleanup: MinGW's std::filesystem::remove reads links through stat, so a
dangling link looks absent and is left in place, and the check expecting
true fails. The two links are now removed with unlink_nid_postfix, which
also checks that guest unlink removes a live and a dangling link.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceKernelTruncate and truncate checked for a symbolic link loop only
after the native truncate failed, but on Windows std::filesystem::status
already reports a self-referencing link as missing, so the call returned
ENOENT before reaching that check. The loop check now runs before the
not-found result too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SuspendThread fails with STATUS_THREAD_IS_TERMINATING for a thread that
has begun to exit while its handle is not signaled yet. TryDeliver took
only the signaled handle as an exit, so the raise deliverer, which keeps
sweeping a target in host code until delivery or exit, threw "cannot
suspend the target thread" and aborted the process when that target
exited in between. The suspension now reads the NTSTATUS from
NtSuspendThread and treats a terminating target as exited; other
failures still throw.
guest_raise_exiting_thread raises at 32 threads per round that block in
a host wait and exit after it, for 100 rounds.
Cover non-null callback registration before init, post-unregister noCallback state on duplicate unregister and device registration, and null parameter initialization.
Cover errno preservation across multiple values, exact-size 24-byte and raw 64-bit word buffers, idempotent calls, and expanded alignment/pattern grid.
A library's imports were renamed in place, so any import whose NID is
longer than its name failed the build: libSceHttp2 importing sceNetRecv
(10 characters, NID 11) stopped at "import NID longer than original
name". Such imports now get their hint/name entry in the appended
.nidimp section that --exec mode already uses, with both thunks
repointed; names that fit are still patched in place, so a library
without short imports keeps its layout. Signed, bound and delay-loaded
imports are rejected before anything is written whenever names move.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#9193 added fragmentBarycentricBuiltins and cleared it in
PixelBarycentricEmulation, but MeshBarycentricEmulation still takes
the flag from the device. On a device with
VK_KHR_fragment_shader_barycentric the host interpolation check then
reads I/J from BaryCoordKHR, the pixel shader does not emulate
barycentrics, and the test fails before its first draw.
Co-Authored-By: Claude Opus 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]>
sceNpMatching2SignalingGetConnectionStatus reports every member inactive
for a known context, since no room is joined offline, and leaves the peer
address and port untouched; a null status pointer throws.
sceNpMatching2AbortContextStart returns NOT_INITIALIZED before
initialization and 0 afterwards. Checks follow shadPS4, with RPCS3's
differences recorded in the technical debt entry.
The test throws std::bad_alloc from a replaced operator new, so on MinGW it needs the same libc link, unwind section rename and DLL path as the other throwing guest tests (the Windows link failed on __gxx_personality_v0).
The 816 bytes after the 128-byte device name are the PS4
SceAutoMounterClientUsbDeviceInfo fields up to the serial length in
flatz's ps4_stub_lib_maker_v2 header: the total and available space, the
vendor id, product id and release, and the manufacturer, product and
serial strings with their lengths. libSceUsbStorage's device-info record
starts with the same layout. Every field offset is now asserted; the
size and offsets do not change.