Commit Graph

2 Commits

Author SHA1 Message Date
7d571f75b7 io_trace_test: /EHa under clang-cl, so the unreadable-name check is caught (RT-IO-TRACE)
copy_name reads the title's name inline in its __try. MSVC always catches that fault; clang-cl only with
asynchronous exceptions, and io_trace_test was built without them (dstorage.cpp has them through its source
property), so under clang-cl the safe_name(16) check ended the test with an unhandled page fault. Reported by
Tauwni on #1931 (clang-cl cross build, Wine 11). Reproduced with clang-cl 21 under Wine: 3 of 3 runs crash at
0x10 without /EHa, 3 of 3 pass with it. The header comment now says a caller needs /EHa under clang-cl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-28 17:26:44 +00:00
9439e6083d dstorage, fs: LEONIDA_IO_TRACE logs every read the title asks for, flushed as it goes (RT-IO-TRACE)
When a boot stops, the startup trace names the files the title opened, but most of its reading goes
through DirectStorage requests and ReadFile on files it opened long before. With LEONIDA_IO_TRACE=<file>,
each DirectStorage request (file, offset, sizes, zlib/BCPack, request name) and each ReadFile, ReadFileEx
or ReadFileScatter on a disk file (path, offset, size) is one line with the local time.

The line is flushed at once into a file shared for reading, so the last reads before a crash are on disk
and can be watched while the game runs. Paths are asked of the handle each time, because a handle value
is reused after a close. io_trace_test covers positioned, overlapped and reused-handle reads, DirectStorage
lines with good and bad name pointers, and pipes being left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:02:02 +05:00