The shared UTF-8 decoder behind JSStringCreateWithUTF8CString and
JSStringIsEqualToUTF8CString now applies StringImpl::create's bounds: more
than INT32_MAX bytes throws before decoding, and non-ASCII input decoding to
more than 2147483635 UTF-16 units throws after a successful conversion.
GuestJSStringValidLength mirrors isValidLength and is tested at both limits.
sceAudio3dPortCreate checks its port id and reserved argument as shadPS4
does, then opens with a 0x10 parameter block. That block selects buffer
mode 0, which still throws, so no port is opened yet.
The 0x10 and 0x18 blocks of sceAudio3dPortOpen now take the defaults
shadPS4 and prosper fill in and go through the field checks before the
buffer mode throws.
sceAudio3dPortDestroy and sceAudio3dPortGetStatus get the signatures
from Orbital and SharpProspero and keep throwing; the debt entries of
the six remaining exports say what is still unknown.
ICU 78.1's u_unescapeAt dereferences the offset and calls the callback without checks, and u_unescape reads the source without one, so a null one faults: throw std::invalid_argument there instead of NotImplemented_nid_no_patch. A negative u_unescape capacity is clamped by _appendUChars and fails every room check, so nothing is written and the full length is returned; only a capacity whose signed difference with the output length overflows, which ICU leaves undefined, still throws.
jxrlib's readIS and writeIS use the bit state, the stream and its callbacks without checks, and pass a null packet to the read or write callback before dereferencing or offsetting it. Throw std::invalid_argument at those points instead of NotImplemented_nid_no_patch, and let a null packet reach the callback first, so a failed write of a null packet returns the callback's error as jxrlib does.
JSStringCreateWithUTF8CString and JSStringIsEqualToUTF8CString take a null
UTF-8 pointer as a null string, and JSStringCreateWithCharacters returns a
null string for null characters of any length, as WebKit's JSStringRef.cpp
and WTF's String constructors do. A length above WebKit's 2147483635-unit
limit and a null handle given to retain, release or the maximum-size query
throw std exceptions where JavaScriptCore crashes. The reference count is a
wrapping 32-bit counter and the maximum UTF-8 size is computed in 32 bits,
as in WTF.
The device test raced sceUsbdCancelTransfer on the first interrupt IN endpoint of the device. On Windows the first one can belong to a mouse or keyboard collection, which the system opens exclusively, so libusb's HID backend cannot read it and the submission failed, reported as a failed cancel race. The test now tries each interrupt IN endpoint, requires a refusal to be the host's I/O error with nothing in flight, and races on the first one the host accepts, with a buffer sized from that endpoint.
Keep a copy of the name with the semaphore and move the export from the libkernel_sys stub into libkernel next to the other sem_* exports.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
PS5_Vulkan measured on a base PS5 set to 1080p output that
sceVideoOutIsOutputSupported(15) answers 0, neither 1 nor an error, and
that sceVideoOutConfigureOutput(15) then returns 0x80290019, in a title
declaring high-frame-rate output. A host display below 120 Hz answered
0x80290016 to both instead. Titles that branch on the answer being 1
are unchanged; the undeclared-title answer stays 0x80290016.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PS5_Vulkan measured on a PS5 (firmware 13.40) that
sceVideoOutRegisterBuffers2 refuses a set at buffers 15 to 19 with
0x80290001. The call threw instead. The other out-of-range arguments
keep throwing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>