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.
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.
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.
An APS5_AB run interleaves phases A and B, and every periodic report
covers the time since the previous report of its kind, so its numbers
need sorting before A and B can be compared. tools/ab_split.py reads
the [ab] lines and counts a [present], [gputime], [draw] pipelined or
[syncwait] report for a phase only when its whole span lies inside the
phase after its settled line. It prints presents per 10 s and frame
time per phase, GPU busy and idle time per frame, GPU time per present
(also per --program key and --class), committer, drain and hook-wait
times, the A and B means, and each B phase against the mean of its
neighbouring A phases, which cancels a linear drift.
AI-assisted: yes
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.
Run tools/tests/test_pr_overlap_progress.py as pr_overlap_progress next to pr_overlap_branch_scan, so check_test_registration --scripts finds a runner for it.
Auditing a title before its first run takes several manual steps from
GAME_TESTING: unwrap eboot.bin and every module the title ships with
unwrap_self.py, convert them with relinker --registry (with
--module-dir for Unity's Media/Modules and Media/Plugins, and for
modules beside eboot.bin), and pass every registry and module folder
to import_audit.py. Missing one module folder turns its imports into
false "absent" entries.
tools/audit_dump.py <app0> --relinker <path> --libs <dir> does those
steps into a temporary directory (or --work <dir>), reading the dump
only. A module that is already a plain ELF is copied; one that is
neither a SELF nor an ELF fails the run. It returns import_audit's exit
code, or 2 when unwrapping or conversion fails.
audit_dump covers the module folders and the module-dir list, a
refused module, the relinker command line, the arguments passed to
import_audit, a relinker failure and the argument errors.
Co-Authored-By: Claude Opus 5.5 <[email protected]>