diff options
| author | Mike7581 <168859477+Mike7581@users.noreply.github.com> | 2026-11-25 01:25:16 -0300 |
|---|---|---|
| committer | Mike7581 <168859477+Mike7581@users.noreply.github.com> | 2026-11-27 16:09:18 -0300 |
| commit | 6f7963abddd7e545f43097c50f687e8e71626d72 (patch) | |
| tree | 4802cab582c64108d3283e9ed6f4c6908ffe2b0e /runtime/test/queue_proxy_test.cpp | |
| parent | 43a9d562d355e7c5c428e486071b456353de8b05 (diff) | |
process: the game's at_quick_exit handlers and thread-local exit callback are the run's own
The game's at_quick_exit() (_crt_at_quick_exit) and _register_thread_local_exe_atexit_callback still
reached the host CRT, which the game shares with gta6rt. Under `gta6rt --run`:
- quick_exit() ran none of the game's at_quick_exit handlers;
- exit() and _cexit() never ran the exiting thread's thread_local destructors, and a second
registration in the host's one-slot callback would terminate gta6rt.
Now _crt_at_quick_exit goes to a second table of the run's own, which quick_exit() runs newest first
under the exit lock; _exit() and _Exit() run none (they no longer share game_quick_exit). The thread-local
callback is the run's own: exit() and _cexit() call it with DLL_PROCESS_DETACH before the atexit handlers,
as the UCRT does, and a second registration aborts, as the UCRT's terminate() does. Both reset per run.
tiny_atexit gains five modes (at_quick_exit, at_quick_exit_exit, at_quick_exit__exit, thread_local_exit,
thread_local_cexit). Their expected sequences in check_atexit.cmake were measured by running the fixture
natively on Windows 11; before this change --run differed on at_quick_exit, thread_local_exit and
thread_local_cexit. run_tiny_atexit now holds 13 paths to the Windows sequence.
Diffstat (limited to 'runtime/test/queue_proxy_test.cpp')
0 files changed, 0 insertions, 0 deletions