CheckEnabledExceptions writes x87 and MXCSR states with some SSE
exceptions unmasked, calls fegetexcept, and expects the environment
afterwards to equal the state it wrote. Under Rosetta 2 MXCSR keeps its
six exception masks set, as CheckTraps already allows for, so whenever
the test unmasks an SSE exception the state read back differs from the
one written, and the check failed although fegetexcept changed nothing.
Compare with the environment read back right after the write instead;
on other hosts the two are the same.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- a timer change with EV_ADD unset and data 0 keeps the period; one that set
fflags was silently ignored, where FreeBSD 11's kqueue_register copies it
onto the note: it now throws with the other re-adds, waiting for the
measured rules
- EV_ENABLE on a disabled timer reports the expiries missed while disabled in
one step and keeps the note's phase, as FreeBSD 11's filt_timerexpire counts
a disabled note and keeps its p_nexttime; TimerDisableEnableRearm pins it
(5 serial runs and 3 rounds of 8 parallel copies pass)
- the next-wait abort from the review round was observed before main's
5cbc46029b wait refactor and does not reproduce
- RecycleBinDeleteWatchedFile now runs on Windows: its call moves out of the
#ifndef _WIN32 block so the $Extend$Deleted$ path is exercised
- InotifyWatchCount and the two leak assertions gate on __linux__ (macOS has
no /proc; the count was always 0 and the assertion vacuous)
- DisableAndEnable, Dispatch, ForceOneshot and StressTest drop with their
main() calls: they belong to the superseded #6510 feature, and StressTest
asserts strict arrival order across 4 threads with 1-2 ms sleeps (CI flake risk)
Carries the additive pieces of #6510 onto main after its feature was
superseded by #5847: the deleteEventFunc invocation when an EV_ONESHOT
note retires in CollectTriggered, the Windows $Deleted path detection
in FileEvent (IsDeleted transitions), the relaxed timer-modify and
SetVnodeNotes guards, and the compatible kevent tests.
sceFontGetFontGlyphsOutlineProfile reports the maxp maximum contours,
points, composite contours and composite points through the driver slot
at SysDriver+0x70, as libSceFont and libSceFontFt do in firmware 13.60.
A maxp older than 1.0 returns SCE_FONT_ERROR_NO_SUPPORT_FUNCTION, and a
failed call clears the output. Font-set records, which the console
merges over system font entries, still throw.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
XSAVEOPT raises an illegal instruction under Rosetta on an M5 running
macOS 27.0.1, as XSAVEC does, while XSAVE and XRSTOR save and restore
x87, SSE and AVX state in the standard format. The PS5's Zen 2 has
XSAVEOPT, so code built for it can use the instruction without a CPUID
check.
XSAVEOPT differs from XSAVE only in the init and modified optimizations:
it may skip writing state that is in its initial configuration or
unchanged since the last XRSTOR from the same area. XRSTOR restores the
same state from the area XSAVE writes, so --to-rosetta rewrites
XSAVEOPT (NP 0F AE /6, memory operand) to XSAVE (/4) in place, keeping
the prefixes and the operand, as RDSEED becomes RDRAND. CLWB (66 0F AE
/6), MFENCE, UMONITOR, UMWAIT and the Intel target are left alone.
XSAVEC is not converted: it writes the compacted format.
The converter tests check the rewrite for the plain, REX.W,
RSP-relative, extended-base, RIP-relative and FS-relative forms, check
that the neighbouring 0F AE encodings are not taken, and execute the
rewritten XSAVEOPT64 followed by XRSTOR on YMM3 in the x86-64 build.
The --to-rosetta integration test now covers XSAVEOPT as well.
The CI run of this branch reports PST8PDT at 995198400 with offset -28800 and daylight 1 where -25200 is expected. The failure message now also prints the host's _get_timezone, _get_dstbias and the host tm_isdst, so the next run shows whether the runner's C runtime leaves the daylight bias at 0. The checks themselves are unchanged.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The raw-byte walk behind the refusal message ignored the prefixes of the
constant rax loads it recognizes. mov r8d, imm32 (41 B8) and
xor r8d, eax (41 31 C0) reported the immediate or zero as the syscall
number, xor ax, ax (66 31 C0) reported a zeroed rax, and mov r8b, imm8
(41 B0) misaligned the walk so an established number was not reported.
An active REX prefix is only the byte immediately before the opcode, and
a REX byte earlier in the prefix run is dead, so 41 66 B8 is a
mov ax, imm16 with one dead byte in front. The B8 arm accepts a REX
without W or B, since rex.R and rex.X do not change the register, and
rejects an operand-size override; the xor arm rejects a 16-bit pair and
the REX bit that extends the destination, B for the 31 form and R for
the 33 form; the B0 arm treats REX.B as a different register and walks
past the three bytes; the 66 B8 arm keeps the dead REX byte in the walked
span. Test the reported and skipped byte patterns on every target.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <[email protected]>
A direct write with completion work, recorded before draws into a resident
linear target, stamps the target's memory again when its batch completes.
The keep rule moved the whole image past that stamp only when nothing in
the image had changed since its generation, so a CPU store anywhere else
in the target, made before the completion, dropped every draw in the
direct write's range at the next store.
For a drawn target, when the whole-image check fails, the stamped 64 KiB
blocks are now checked one by one. A block with no change since the
image's generation is recorded as kept at the stamp (completionKept), and
writeBackLayers and the unwatch path read that per-block generation, so
the draws there are stored while a block the CPU wrote keeps the CPU's
bytes outside the drawn rectangles. Whole-image keeps of drawn targets are
rechecked for CPU stores after the stamp and fall back to the per-block
keep. The per-block values are cleared when the layer starts a new
pending period.
agc_driver_linear_target_direct_write_completion gains the ordering from
review: a fill over block 0, a draw into block 0, a CPU store into block 1
while the fill's completion is still pending, then the label, on
write-watched and unwatched memory.
Co-Authored-By: Claude <[email protected]>
macOS pwrite and pwritev write at the given offset even when the
descriptor was opened with O_APPEND. FreeBSD's vn_write appends to an
O_APPEND regular file whatever the offset and leaves the file offset
unchanged, and Linux pwrite appends too. On macOS, sceKernelPwrite,
pwrite, sceKernelPwritev, pwritev and the AIO write commands now append
such writes with writev and restore the file offset, as #8359 does on
Windows.
Co-authored-by: Himansh Raj <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Linux and MinGW, --exclude-libs keeps the statically linked mbedtls
out of libSceSsl's dynamic exports. Apple's linker has no such option,
so on macOS libSceSsl.prx exported 930 mbedtls and 155 PSA symbols, and
libSceLibreSsl.prx 27 mbedtls symbols. A program that links its own
mbedtls can then bind to libSceSsl's copy, which allocates from
libSceSsl's own pool; guest_ssl_transport_kernel and
guest_ssl_transport_net fail that way. Build the mbedtls libraries with
hidden visibility on macOS instead.
Co-authored-by: Ycaro Gabriel <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The unknown-conversion branch printed %m, positional arguments, the grouping
flag and modifiers in an unusual order as literal characters. Only characters
FreeBSD's vfprintf prints as themselves are now printed.
(cherry picked from commit 0106858d3d39f83eb2234a5f581d5bf5260521a0)