Repository navigation
Lazy-load GDI cleanup and USER32 helper APIs - #174
Merged
Merged
Conversation
Resolve typed System32 helpers on demand and admit GDI cleanup before native calls can produce owned outputs. Preserve native errors, explicit cleanup retry, and success-only process-lifetime caches. Add production ordinary/delay PE gates, release-wheel checks, focused ownership tests, and retained import evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the optional subsystem policy ordinary-only while checking GDI/USER32 and CoreMessaging against both import tables. Cover delay-only acceptance and eager rejection for all four optional subsystem DLLs in PE32 and PE32+ CLI fixtures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mixed-language test coverageWorkflow status: ✅ Passed
|
Shawn Yuan (shuaiyuanxx)
approved these changes
Sep 20, 2026
Integrate main f446adb while retaining shared PreparedCall ownership. Recompute cleanup admission when methods are built or rebound, and verify that missing GDI cleanup still prevents dispatch. Retain separate ARM64 production and metadata-lifetime merge-validation evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
shisan (qiutongMS)
approved these changes
Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes direct GDI32/USER32 ordinary and delay imports from the measured production binaries. Cold-process DLL counts did not decrease on this machine: the Node host and remaining Windows dependencies still map those DLLs. This is not complete non-UI physical isolation or a startup-speed claim.
This independent PR targets
mainfrom34eb6246627c671113a501c00edc8e3317fc8b3dand is limited toDeleteObject,DestroyIcon,CreateWindowExW, and the four existing DPI-awareness helpers. OLEAUT32 and normal WinRT COM infrastructure remain unchanged. No binary split, domain redesign, or changes to the existing CoreMessaging/MAPI/GDI+/MF/Winsock loaders.Implementation
extern "system"signatures and System32-only DLL search. Success-only caches retain the winning loader reference; failed and race-loser references are released. Loading/export lookup runs outside publication locks.DestroyIcon. Existing DPI policy and thread affinity remain intact..pydwithout rebuilding it.Validation
.nodeand CPython 3.13.pyd, before/afterdumpbin /importsconfirms all three changed production images26 calibrated before/after cold child-process observations use an external K32 observer with child-reported PID, phase handshake,
ntdll.dll/module-count controls, and bounded natural exit. Node remains 35 host → 37 import/primitive → 39 Uri modules; Python remains 15 → 28 → 30. Registration adds no modules; hidden-window creation is an explicit opt-in probe.The x64 addon was cross-built and statically inspected, not run in an x64 Node host. x64/i686 native tests used ARM-host emulation, not physical x64/i686 hardware. Local Python measurements cover ARM64 CPython 3.13 only; no general older-Windows compatibility claim.
Design and precise limits · Retained PE tables, hashes, module observations and regression-log digests
No merge, release, or tag performed; ready for coordinator review.