A Protect or Unmap that ran out of memory while applying its range patch
had already changed the host mapping, leaving the registry and the mapping
disagreeing. The replacement nodes are now allocated before the apply
callback runs, so applying the patch cannot fail. guest_allocations_oom
injects an allocation failure at every allocation of a Protect and of an
Unmap and checks that the registry is unchanged when the call throws.
public_headers takes about 18.7 s and the check_compile_modes cases are
similar, against a 30 s limit, so they time out on a loaded Windows runner.
public_headers now has 90 s and each check_compile_modes case 60 s.
A Windows conversion now fails when a code entry lies after the first
byte of a guest GS instruction that the TLS builder replaces with UD2.
The new debt entry names both messages, says that no option skips the
checks and that Linux output keeps the instruction, so a user who hits
the refusal knows which target to use.
sinh_nid_postfix called the host libm's sinh. It now follows the branches and
thresholds of FreeBSD msun's e_sinh.c (release/11.4.0): below 22 through expm1,
between 22 and ln(DBL_MAX) through exp, and up to the overflow threshold through
exp scaled as in k_exp.c's __ldexp_exp. Below 22 the results are bit-identical to
msun; from 22 on they depend on the exp this file provides.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
XNU's poll never reports POLLPRI for out-of-band data, so a guest poll
that asks for it never sees the urgent byte: guest_poll aborts at the
OOB case and a title waiting on priority data would sleep to its
timeout.
On macOS the pending byte is read from SIOCATMARK, which reports it
without consuming it and has no descriptor limit, unlike the fd_set
probe this replaces. POLLRDBAND is set with POLLPRI as FreeBSD 11.4's
sopoll_generic does, and the wait takes the sliced path main already
uses for a kqueue wait, so it wakes on the next slice instead of at the
deadline.
recv(MSG_OOB | MSG_PEEK) was measured to consume the byte on macOS
27.0.1 and kevent with NOTE_OOB does not fire there, which is why the
probe is SIOCATMARK. The select and libSceNet poll paths still miss
urgent data on macOS and are recorded in the debt entry.
On Windows the UCRT drops a write that directly follows a read on an r+,
w+ or a+ stream: fputc and fprintf report success, fwrite returns 0 and
fputs returns EOF, all without the error indicator, and the file is left
unchanged, also after an fflush. On a stream open only for reading, fputc
after a read reports success as well.
Writes now first do what FreeBSD 11.4's __swsetup does: a stream open only
for reading fails with EBADF and sets the error indicator, and an update
stream that is reading drops its read buffer and ungetc data, clears end
of file and writes at the descriptor's offset. This covers fwrite, fputs,
fputc, putc_unlocked, fprintf, fprintf_s, fputwc, fputws, fwprintf,
fwprintf_s, puts and wprintf, and printf, vprintf and printf_s, which
write to standard output through PrintWindows and now return -1 there
instead of throwing.
Linux is unchanged: glibc writes at the stream position, which the libc
technical debt now records.
The [draws] line said how many render passes the recorded draws began
and how many continued one, not why a draw could not continue. Yakuza 0
(PPSA31327) begins about 1,000 passes per frame, one every 8 draws, each
costing the pass's attachment store and load and two ALL_COMMANDS
barriers; which of those breaks a change could avoid was not visible.
Recorder::StartDrawPass returns the reason (PassBreak): the batch is new,
a non-draw command, a label store, the sample counter or a sample segment
closed the previous pass, the draw asked for a pass of its own, the pass
key differs, or one of the PassHazard values. The batch remembers which
caller closed its last pass (RenderPass::closedBy, set by
endOpenRenderPass). Draw keeps the reason in the outcome, the [draws] line
prints the non-zero reasons after "render passes N begun", and
Graphics::DrawPassBreaks() returns the cumulative counts for the test.
No behaviour changes.