Repository navigation
Conversation
…talled game_abort() ended the run directly, so a title's own SIGABRT handler never ran. Raise SIGABRT only when a handler is registered (the guest's signal() import binds to the host CRT), leaving the default and ignored cases ending with code 3 so the host is never killed. Add a synthetic fixture with handler, returning-handler, ignore and default modes plus a native-vs-loader exit-code test. AI-assisted (OpenCode)
Kam471
left a comment
There was a problem hiding this comment.
Tested b2e888f5 on Windows 11, MSVC 19.44.35228 + Ninja, RelWithDebInfo.
- Built
gta6rt, thetiny_gamefixture andtiny_game_abort_test(36/36 steps). ctest -R tiny_game_abort --output-on-failure-> 1/1 passed, 1.14 s.- The verbose run shows the default/no-handler controls keeping exit 3, and the handler modes running the guest's
SIGABRTpath before the normal shutdown; theFAILlines in the verbose log are the deliberate no-shim control run, not test failures (the ctest verdict is green).
The change reproduces the native ordering (raise only when a handler is installed, then keep code 3 for the default/ignored case), which is what the guest CRT would do. No game files; no blocker.
|
Tested
|
|
Tested
|
|
Tested b2e888f on Windows 11 (MSVC RelWithDebInfo): full runtime build, then ctest for the shim/loader tests (loader, pe_loader, loader_tls, dll_thread_calls, unimplemented_policy, startup_trace, xmem, process_cmdline, file_system, winhttp_offline, xgameruntime, run_tiny_*, allocator_proxy) — 28 of 28 passed. AI-assisted. |
Claimed in the coordination issue as: the free RT item released by @kotorvr (claim).
What and why
game_abort()recorded exit code 3 without giving the guest'sSIGABRThandler a chance to run. The guest'ssignal()import binds to the host CRT, sostd::signal/std::raiseon that table reproduce the native ordering: raise only when a handler is installed, then keep gta6rt's code 3 for the default, ignored and returning-handler cases so the host process is never terminated.A synthetic fixture now has handler,
exit()-from-handler, returning-handler, ignore and default abort modes. A new test compares native and mapped exit codes for each one; current UCRT fail-fasts with0xC0000409for the three non-exiting cases, which is recorded as an intentional difference from gta6rt's code 3.docs/runtime_imports.mdstates the new behaviour.Tested
ctest -R "^run_tiny_game": 9/9 passed, including the newrun_tiny_game_abort_exit_codes(10/10 native/mapped exit-code checks in that test).cteston this branch: 134/134 passed, 0 failed (9 skipped, 1 disabled).process.cppreverted tomain,gta6rt abort-handlerexits 3 instead of 43 and the new test fails; the other nine checks still pass. Restoring the fix makes all ten pass.Checklist
docs/design.md, with how it was confirmed. (Not a translator change.)AI-assisted (OpenCode)