Skip to content

process: at_quick_exit handlers of the mapped title are kept and run by quick_exit - #8657

Open
tedin7 wants to merge 5 commits into
ItsNotRexed:mainfrom
tedin7:c2-process-at-quick-exit
Open

tedin7 wants to merge 5 commits into
ItsNotRexed:mainfrom
tedin7:c2-process-at-quick-exit

Conversation

@tedin7

@tedin7 tedin7 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Keep per-run quick-exit handlers and run them newest first on quick_exit; immediate termination skips them.

Why

Mapped modules otherwise register with the host CRT, while the shim runs none of their quick-exit handlers.

Tested

  • Windows p2: process_cmdline_test passed with a callback registering another during quick_exit; a count-limited drain negative control failed all 6 quick_exit cases (23 instead of 231). Mapped executable registration remains untested: the existing fixture needs a separate executable and test target.

  • Windows p2, process_cmdline_test: origin/main with the regression test failed (6 missing imports); patched revision passed all 12 registration/termination combinations.

  • Review follow-up adds ordinary exit and _Exit to the registration/termination matrix. On Windows p2, /root/fast_test_exe.sh /root/c2-c2-process-at-quick-exit process_cmdline_test passed at 7219cf1.

  • git diff --check and scripts/check_no_game_data.py on changed files passed. No game files or GPU used.

AI-assisted (Codex).

@ItsNotRexed: an exe PR, as you asked.

Claim: #8504 (comment)

@smowlyy

smowlyy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Verified head 7219cf1fa merged onto main (867d922f0) on native Windows 11 (10.0.26300.9974, MSVC 19.44, RelWithDebInfo):

  • python -I scripts/check_no_game_data.py on all 3 changed files: clean (exit 0)
  • cmake --build runtime/build --target process_cmdline_test --parallel: built cleanly
  • ctest --test-dir runtime/build -R process_cmdline --output-on-failure -V: 1/1 passed

AI-assisted.

@lohant27-netizen

Copy link
Copy Markdown

Tested 7219cf1fa on Windows 11 (10.0.26300), NVIDIA GeForce RTX 5070 (driver 32.0.16.2101, subgroup 32), MSVC with SDK 10.0.26100, Release, merged onto main 867d922f0 together with #8685, #8663, #8682, #8623, #8659 and #8657 (no conflicts): pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants