XNU's poll reports POLLHUP as soon as either direction of a stream socket has ended, adds POLLPRI and POLLRDBAND to it and then drops POLLOUT. FreeBSD's sopoll_generic reports POLLHUP only once the receive and the send side are both shut, and Linux does the same, so on macOS a guest saw POLLIN|POLLHUP for a stream whose peer had only shut its sending side, and POLLHUP for one that had only shut its own.
When the host reports POLLHUP on a guest stream socket, ask it about each direction alone and keep POLLHUP only when both have ended, report the requested POLLOUT while the sending side is shut or writable, and leave urgent data to SIOCATMARK.
A test executable that links no guest library and is built for MinGW fails
to link when one of its objects has an exception landing pad: the guest
libc provides __gxx_personality_v0, and host-only links do not see it.
configure_host_test_executable(<target>) centralises the fix already
spelled out by hand in core/libs: native SEH unwind tables and a static
runtime. Migrated the two targets whose blocks matched it exactly
(patched_libraries_tests, guest_kernel_sys_threads_tests); their MinGW
build is unchanged by construction. Documented the rule in CONVENTIONS.
Unblocks none; guards the same class as the CI check in #11343.
RelinkerPipeline::Relink accepted ET_EXEC input, and every Linux mode
placed it at base + p_vaddr: at 0x400000 by default, at the
--linux-fixed-base address, or at a load bias as ET_DYN with
--lazy-binding, so its absolute references that carry no relocation
kept pointing at the link addresses. The gABI chapter on program
loading says the segments of an executable file must reside at the
virtual addresses used to build it. ET_DYN and the SCE dynamic types
0xfe10 and 0xfe18, the types WindowsLoadImage already accepts as
position independent, may be placed at a base. Relink now rejects
ET_EXEC on every target before the allowlist, which accepts ET_DYN,
0xfe10 and 0xfe18. ET_EXEC input now exits 2 without writing output;
outputs for the other accepted types are unchanged.
Main now implements ten JSString functions in libSceJsc/Export.cpp and has its
own debt file. Take main's files and append the 150 import-resolution stubs
of this PR after them, with their debt entry; none of their NIDs is defined on
main.
Main took request serialization version 47 for the two-sample dithered
alpha-to-coverage value. The depth export clamp bounds are now written at
version 48 and read only for versions from 48, so a version 47 request as main
writes it still decodes, with default bounds. Tests: version 48 is the
emitted prefix, 49 the first unsupported one, and a version 47 two-sample
dithered request (with and without depth export) decodes as written.
An executable relocation of type R_X86_64_64, PC32, 32, GLOB_DAT or
JUMP_SLOT against an STT_TLS symbol, defined or undefined, became a
named import, and the Linux output kept it typed STT_TLS. The gABI
allows STT_TLS symbols only in TLS relocations, since their value is
an offset in the TLS block and not an address, and GuestImageReader
already rejects such relocations in guest modules. The pipeline now
fails on them in extractRela for every target and writes no output.
A failed vkAllocateMemory still makes the host import budget follow the
driver's VK_EXT_memory_budget report, but only VK_ERROR_OUT_OF_HOST_MEMORY
and VK_ERROR_OUT_OF_DEVICE_MEMORY pin the permanent ceiling. RADV reports a
refused user-memory import as VK_ERROR_UNKNOWN or
VK_ERROR_INVALID_EXTERNAL_HANDLE, and pinning on those collapsed the budget
to the few MiB live at the time.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ANYPS5_BUILD_FUZZERS builds relinker_conversion_fuzzer with AddressSanitizer
and UndefinedBehaviorSanitizer in relinker-only Clang builds on Linux. The
first input byte selects the target system, --to-intel and the unused-filter
level; the rest is the executable passed to Conversion::Convert, the path the
web converter takes. tools/relinker_fuzz_seeds.py writes the relinker test
fixtures as seeds, and CTest runs a short smoke run.
Conflicts with main's newer libc changes resolved without changing either
side: the debt list keeps each side's entry changes (per entry, deletions
included), GuestMath.cpp keeps both sides' test functions and calls, and
Math.cpp differs from main by exactly this branch's own changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fragment the pool into single free pages, map a range no single run holds, check each page keeps its own data, and check an exhausted pool still reports no free run.
_ammMap took one contiguous run of the direct memory given to the mapper and
threw (an uncaught runtime_error -> abort) when the pool was fragmented:
PPSA03671 aborted ~4 min into a slot-4 load on an 11 MB map ("AMM: no free run
of 11010048 bytes"). The PS5 maps the mapper's pages through page tables, so a
fragmented pool still serves the map: when no run fits, the map now takes
pages from several runs (first fit) and maps each contiguous group. Run hww8:
the 11 MB map and several 10-33 MB maps went through, no abort.
The public header audit wants one declaration per export in the library header, so Api.hpp declares them with their definitions' signatures and the tests include it instead of their own extern blocks.
An Unknown export whose NID is a symbol of the tree is rejected by the unknown-nid convention check, so the alias takes the symbol's name, as the already identified ones do.