Skip to content

fix: add crash diagnostics for ARM64 power notification crash - #51205

Merged
codebytere merged 1 commit into
42-x-yfrom
trop/42-x-y-bp-fix-add-crash-diagnostics-for-arm64-power-notification-crash-1776774057362
Apr 21, 2026
Merged

codebytere merged 1 commit into
42-x-yfrom
trop/42-x-y-bp-fix-add-crash-diagnostics-for-arm64-power-notification-crash-1776774057362

Conversation

@trop

@trop trop Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Backport of #51198

See that PR for details.

Notes: Added crash keys to diagnose power monitor shutdown crash on arm64 windows.

On ARM64 Windows, UnregisterSuspendResumeNotification (user32) forwards
to PowerUnregisterSuspendResumeNotification (powrprof), which treats the
HPOWERNOTIFY handle as a pointer and dereferences it. The user32 API
returns an opaque handle, not a pointer-backed allocation, causing an
access violation at shutdown.

Add crash keys (pm-reg-handle, pm-reg-memstate, pm-unreg-memstate) to
capture
- The handle value
- VirtualQuery memory state at both registration and unregistration

If the handle address is MEM_FREE, it confirms the handle is an opaque
index and powrprof is incorrectly dereferencing it. If MEM_COMMIT, it
would indicate a use-after-free of the underlying allocation.

Refs https://github.com/MicrosoftDocs/sdk-api/blob/docs/sdk-api-src/content/powerbase/nf-powerbase-powerunregistersuspendresumenotification.md

Co-authored-by: deepak1556 <[email protected]>
@trop
trop Bot requested review from a team and deepak1556 April 21, 2026 12:21
@trop trop Bot added 42-x-y backport This is a backport PR semver/none labels Apr 21, 2026
@codebytere
codebytere merged commit e9d5977 into 42-x-y Apr 21, 2026
128 of 130 checks passed
@release-clerk

release-clerk Bot commented Apr 21, 2026

Copy link
Copy Markdown

Release Notes Persisted

Added crash keys to diagnose power monitor shutdown crash on arm64 windows.

@codebytere
codebytere deleted the trop/42-x-y-bp-fix-add-crash-diagnostics-for-arm64-power-notification-crash-1776774057362 branch April 21, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants