FT_Bitmap_Init_nid_postfix was only declared locally in GuestFreeTypeBitmapInit.cpp; it is now declared in libSceFreeType Api.hpp next to FT_Bitmap_New with the signature the implementation uses, and the test includes the header.
GuestHostStandardError.cpp declared __cxa_allocate_exception and __cxa_throw locally on macOS; they are declared once in exceptions/Runtime.hpp, which Api.hpp includes, so public_headers rejected the second declaration.
CheckMlock reads VmLck and expects ENOMEM from mlock of reserved and unmapped ranges. ThreadSanitizer, like AddressSanitizer, replaces mlock and munlock with interceptors that return 0 without locking anything, so skip the same checks that ANYPS5_ENABLE_ASAN already skips. The guest arena range check stays as is: a ThreadSanitizer build keeps the default range.
The sanitizer runtimes intercept mlock, munlock, mlockall and munlockall and return 0 without calling the kernel (TSAN_OPTIONS=verbosity=1 prints "ThreadSanitizer ignores mlock/mlockall/munlock/munlockall"). VmLck therefore never grows and mlock of an unmapped or reserved range succeeds, so the ENOMEM and locked-size checks that are already skipped under ANYPS5_ENABLE_ASAN are skipped under ANYPS5_ENABLE_TSAN too.
Add the ThreadSanitizer compile and link options, keep frame pointers for usable report stacks, and define ANYPS5_ENABLE_TSAN=1 so sources and tests can tell a ThreadSanitizer build apart. The guest arena keeps its default range: it starts below ThreadSanitizer's application memory limit, and the arena already records host mappings such as the runtime's protected gaps as used ranges.
GCC rejects -fsanitize=thread together with -static ("cannot specify -static with -fsanitize=thread"), and the ThreadSanitizer runtime has to come up before libc. Leave the -static -static-libgcc -static-libstdc++ executable flags out when ANYPS5_ENABLE_TSAN is on, as the ASan branch already does.
Declare a ThreadSanitizer switch next to ANYPS5_ENABLE_ASAN and reject it on other systems and compilers, as ASan does. The two sanitizers cannot share one process, so configuring both is a fatal error.
Prospero Win measured on firmware 12.02 that the PS5 kernel accepts
MAP_EXCL but ignores it: MAP_FIXED | MAP_EXCL over an existing mapping
replaces it without error. Fixed anonymous mmap now does the same instead
of FreeBSD's ENOMEM. MAP_EXCL without MAP_FIXED stays EINVAL.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code analysis added a branch displacement to the next instruction's
address as std::int64_t. For a code segment mapped across 2^63 the sum
overflowed. Add it as an unsigned value, as the function-symbol sweep in
the same collector already does.
#9181 stopped write-protecting resident runs on Windows: the write watch
no longer arms them read-only, and the import access opens nothing on
them. The gate's case that counted armed read-only private pages as
writable can no longer change a decision, and the tests that armed a
resident run first could only skip.
Remove the case: resident runs are read-write private pages and pass the
writable check as they are. --armed becomes --direct, the same 2 MiB
direct-memory run without the arming step. --armed-gate becomes
--private-gate and keeps the checks that can still be reached: the
direct run is refused under Unwatch and imported under Watch, and a
block committed read-only while registered writable is refused without
being counted.
Co-Authored-By: Claude <[email protected]>
The nine-slot _ZTVSt7collateIcE export added by #9979 was still zeroed, so a guest that called through the exported vtable faulted. Fill slots 2 through 8 with the same facet methods that g_collateVtable uses, leave the offset-to-top and typeinfo slots zero, and cover compare, transform, hash, retain and release through the exported object.
The single-instance guard checked g_mfsrObjects under g_mfsrMutex, released
the lock, then reacquired it inside CreateMfsrObject to insert, so two
concurrent creates could both observe no shared-resources object and both
succeed. Hold the mutex across the busy check and the emplace instead; the
lock scope also preserves the firmware order, which returns 0x8A810015
before validating the arguments. guest_psml_tests gains a concurrent
create check for the reachable uninitialized contract; the busy branch
itself cannot be exercised while scePsmlMfsrInit cannot succeed on the
modelled console.
Keep module identity evidence local to the later snapshot rather than inheriting older records through --since. Cover raw address and collapsed stack inputs, explicit unverified operation, and a changed build identity.
AI-assisted: yes (Codex).
The debt entry said that shrink-wrapped leaves, which push later and pop in
balance, could be framed. They cannot as the framer works now: lowering RSP on
entry moves their later pushes onto the spills, which keep their addresses.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Match the AT_REMOVEDIR and rmdir sites so file reparse points stay on the old unlink path. Cover file symlink unlinkat on Windows and point the debt at the drive-target consumers.
rmdir followed the junction and reported ENOTEMPTY, and unlink treated it as a real directory, so a junction to a non-empty folder could not be removed.