Repository navigation
Add Windows ARM64 diagnostics test runs - #6075
Merged
Merged
Conversation
Enable public and internal win-arm64 builds and Helix execution, including the managed-only test projects and SOS coverage on Windows 11 ARM64 queues. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Report the underlying DAC activation failure so remaining ARM64 CDB failures identify whether loading or CLRDataCreateInstance failed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Initialize SOS managed services in the existing CoreCLR after loading the native extension. Cover live and dump hosting and preserve error/warning output for diagnostics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore native DAC logging and DbgEng output capture to their original behavior. Keep the shared-CoreCLR fix and verify the host cannot be changed after initialization using normal output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
steveisok
approved these changes
Sep 30, 2026
Member
Author
|
/ba-g unrelated test failures |
max-charlamb
added a commit
that referenced
this pull request
Oct 1, 2026
## Problem `HostServices.Uninitialize` releases the native debugger-services COM reference twice: 1. `DebuggerServices` is registered in the global service container as `SOSHost.INativeDebugger`. Although that interface does not inherit `IDisposable`, the concrete object inherits `CallableCOMWrapper`, which does. 2. `ServiceContainer.DisposeServices()` checks the concrete instances for `IDisposable` and calls `DebuggerServices.Dispose()`, releasing the wrapper's owned COM reference. 3. `Uninitialize` then calls `DebuggerServices.ReleaseWithCheck()`, which invokes a raw COM `Release()` again rather than respecting the wrapper's disposed state. This is a double COM release, not necessarily an immediate double free in every run. With other references outstanding, it incorrectly consumes another owner's reference; if the first release destroys the native object, the second release can call through freed memory. ## Provenance The explicit release predates service-container ownership and was originally appropriate. #3448 introduced global service disposal while leaving `DebuggerServices` outside the container. #4285 subsequently registered the same wrapper as `SOSHost.INativeClient` so `SOSHost` could use the existing native debugger client, but retained the manual release. #4437 later renamed that interface to `INativeDebugger`. `CallableCOMWrapper` already implemented `IDisposable` when the registration was added, so this is an ownership mismatch rather than a recent ClrMD disposal-contract change. ## Fix - Remove the redundant explicit release; the service container disposes `DebuggerServices` exactly once. - Detach `DiagnosticLoggingService` from its debugger-backed console before disposing global services. Its singleton retains a `ConsoleServiceFromDebuggerServices` that forwards trace output to the native debugger interface; leaving that connection active during disposal could issue output through a released pointer. - Preserve target destruction and the shutdown event before global service disposal. This was found while investigating Windows ARM64 SOS tests in #6075, but the ownership bug is architecture-independent. This PR does not establish that it caused the separate `Output` versus `Output2` callback behavior. ## Validation Targeted restore and build of `src\SOS\SOS.Extensions\SOS.Extensions.csproj` succeeded for `net8.0` and `net462` with zero warnings and errors. No native teardown reproduction or ARM64 runtime validation has been performed for this fix. Co-authored-by: Max Charlamb <maxcharlamb@microsoft.com> Copilot-Session: 13f45840-6112-4dc4-ab2f-c020bd189022
This was referenced Oct 3, 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
Validation