codebytere

#53038: fix: terminate utility processes immediately on Windows instead of running CRT exit

Merged
Created: Aug 20, 2026, 4:52:41 AM
Merged: Aug 20, 2026, 9:57:20 PM
4 comments
Target: main

Description of Change

A utility process returns from ContentMain() into the CRT's exit(), which runs the detach handler of every loaded DLL. On Windows 11 24H2 and 25H2 the system DLLs loaded into short-lived utility services (shell icon reading, the proxy resolver) crash in those handlers: a delay-load into combase's private api-set from a DllMain, and WIL's shutdown probe calling GetProcAddress on ntdll, both reading freed memory.

Chrome has terminated utility processes with TerminateCurrentProcessImmediately() since https://crrev.com/c/2623747 for this reason; do the same once ContentMain() returns.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • PR title follows semantic commit guidelines

Release Notes

Notes: Fixed utility process crashes at exit on Windows 11 24H2 and later.

Backports

42-x-y
Pending
Waiting for a manual backport
43-x-y
Pending
Waiting for a manual backport
44-x-y
Pending
Waiting for a manual backport

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron