diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-23 12:35:02 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 05:38:10 -0500 |
| commit | 60fce7a747433733aab6eab183461be718341c41 (patch) | |
| tree | 73d7fb06675cfc6e8db29ad1c63b1dbf1908b41c /runtime/xma_decoder/tests/ffi_cpp_smoke.cpp | |
| parent | 21625bca8c675c62f9dbffc318ce6a59d57faf31 (diff) | |
startup_trace: LEONIDA_SKIP_INT3 works on title threads and with Wine's breakpoint address
Spacecer2 measured under Wine 11.22 (old upstream 7599) that LEONIDA_SKIP_INT3 never took
effect: the flag was a block-scope static first read on a title thread, whose
MSVC thread-safe-static guard passed with the object still zero, and the
handler's int3 set and the trace lock had the same shape.
- The flag is read by startup_trace::open(), on the thread that opens the trace,
into a constant-initialized atomic.
- The trace lock is a constant-initialized SRW lock (no constructor, never
destroyed), and the logged int3 sites are a constant-initialized table of
atomics: the handler touches no block-scope static.
- The int3 is found from Rip (Windows) or Rip - 1 (Spacecer2's Wine run), and
Rip always ends one byte past the 0xCC.
- skip_int3 returns false for a null EXCEPTION_POINTERS, record or context.
- LEONIDA_LOG_GAME_EVENTS and LEONIDA_HDR, read on title threads, are cached in
namespace-scope atomics instead of block-scope statics.
int3_skip_test runs each case in a child process: real int3s, the Windows and
the Wine breakpoint forms, the null pointers, the flag read at open() and the
flag off. The wine, null and init cases fail on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder/tests/ffi_cpp_smoke.cpp')
0 files changed, 0 insertions, 0 deletions