Repository navigation
[cDAC] Remove vestigial JupiterRefCount from HandleData contract - #130448
Merged
max-charlamb merged 1 commit intoJul 10, 2026
Merged
max-charlamb merged 1 commit into
max-charlamb merged 1 commit into
Conversation
Remove the vestigial JupiterRefCount member from the managed cDAC HandleData contract while preserving the SOSHandleData COM field by reporting 0. Co-authored-by: Copilot <[email protected]> Copilot-Session: f2aa5dc4-0c99-43f0-af14-734143849c4a
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the managed cDAC GC handle contract shape by removing the JupiterRefCount member from HandleData, while keeping the COM-facing SOSHandleData.JupiterRefCount field intact (now explicitly reported as 0).
Changes:
- Removed
JupiterRefCountfromMicrosoft.Diagnostics.DataContractReader.Contracts.HandleData(Abstractions surface). - Updated the GC contract implementation (
GC_1) to stop initializingHandleData.JupiterRefCount. - Updated the legacy SOS DAC COM adapter (
SOSDacImpl) to always emitSOSHandleData.JupiterRefCount = 0.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs | Hardcodes SOSHandleData.JupiterRefCount to 0 when projecting handle data to the COM struct. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/GC/GC_1.cs | Removes initialization of the now-deleted HandleData.JupiterRefCount field. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IGC.cs | Removes JupiterRefCount from the public HandleData record struct contract. |
steveisok
approved these changes
Jul 10, 2026
| @@ -644,7 +644,6 @@ private HandleData CreateHandleData(TargetPointer handleAddress, byte uBlock, ui | |||
| HandleData handleData = default; | |||
| handleData.Handle = handleAddress; | |||
| handleData.Type = GetInternalHandleType(type); | |||
Member
There was a problem hiding this comment.
This change isn't in the contract documentation. Please fix.
max-charlamb
pushed a commit
to max-charlamb/runtime
that referenced
this pull request
Jul 10, 2026
PR dotnet#130448 removed the vestigial JupiterRefCount field from the cDAC HandleData contract, but left the GC data-contract doc pseudocode setting it. Remove the stale handleData.JupiterRefCount assignment from CreateHandleData. (The COM ABI struct still exposes the field and reports 0, unchanged.) Co-authored-by: Copilot <[email protected]>
max-charlamb
added a commit
that referenced
this pull request
Jul 10, 2026
…leData changes (#130531) ## Summary Small docs-only follow-up aligning the cDAC data-contract documentation with two recently merged changes that updated the contract implementations but not their docs. ### 1. `RuntimeTypeSystem.md` -- big-RVA offset masking (follow-up to #130501) #130501 fixed big-RVA field-offset detection by masking the packed type bits before comparing `FieldDesc::DWord2` against the `FIELD_OFFSET_BIG_RVA` sentinel, but left the `GetFieldDescOffset` pseudocode showing the old unmasked comparison. Updated the pseudocode to mask the offset out of the packed `DWord2` (27-bit offset + 5-bit type) before the sentinel check, matching the shipped implementation and native `FieldDesc::GetOffset`. ### 2. `GC.md` -- `JupiterRefCount` removal (follow-up to #130448) #130448 removed the vestigial `JupiterRefCount` field from the cDAC `HandleData` contract, but left the `CreateHandleData` pseudocode setting it. Removed the stale `handleData.JupiterRefCount = 0;` assignment. (The COM ABI struct still exposes the field and reports `0`, unchanged.) Docs-only change. --------- Co-authored-by: Max Charlamb <[email protected]> Co-authored-by: Copilot <[email protected]>
eiriktsarpalis
pushed a commit
that referenced
this pull request
Jul 15, 2026
…0448) ## Summary - Remove the vestigial `JupiterRefCount` member from the managed cDAC `HandleData` contract type. - Preserve the public `SOSHandleData.JupiterRefCount` COM ABI field and report it as `0`. - Keep the DEBUG cDAC-vs-DAC parity assert intact; both implementations continue to expose `0` for this field. ## Details `JupiterRefCount` represents a dead Windows 8-era WinRT/Jupiter concept. The cDAC contract never populated meaningful data for it, and the legacy DAC also hardcodes this value to `0`. This cleanup removes the field from the internal managed contract surface while leaving the shipped COM struct unchanged for compatibility. ## Testing - `build.cmd clr+libs -rc release` (after cleaning stale native CMake cache directories) - `dotnet build src\native\managed\cdac\cdac.slnx -c Debug -m:1` - `dotnet test src\native\managed\cdac\tests\UnitTests\Microsoft.Diagnostics.DataContractReader.Tests.csproj -c Debug --no-build` > [!NOTE] > This PR was generated with the assistance of GitHub Copilot. Co-authored-by: Max Charlamb <[email protected]>
eiriktsarpalis
pushed a commit
that referenced
this pull request
Jul 15, 2026
…leData changes (#130531) ## Summary Small docs-only follow-up aligning the cDAC data-contract documentation with two recently merged changes that updated the contract implementations but not their docs. ### 1. `RuntimeTypeSystem.md` -- big-RVA offset masking (follow-up to #130501) #130501 fixed big-RVA field-offset detection by masking the packed type bits before comparing `FieldDesc::DWord2` against the `FIELD_OFFSET_BIG_RVA` sentinel, but left the `GetFieldDescOffset` pseudocode showing the old unmasked comparison. Updated the pseudocode to mask the offset out of the packed `DWord2` (27-bit offset + 5-bit type) before the sentinel check, matching the shipped implementation and native `FieldDesc::GetOffset`. ### 2. `GC.md` -- `JupiterRefCount` removal (follow-up to #130448) #130448 removed the vestigial `JupiterRefCount` field from the cDAC `HandleData` contract, but left the `CreateHandleData` pseudocode setting it. Removed the stale `handleData.JupiterRefCount = 0;` assignment. (The COM ABI struct still exposes the field and reports `0`, unchanged.) Docs-only change. --------- Co-authored-by: Max Charlamb <[email protected]> Co-authored-by: Copilot <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
JupiterRefCountmember from the managed cDACHandleDatacontract type.SOSHandleData.JupiterRefCountCOM ABI field and report it as0.0for this field.Details
JupiterRefCountrepresents a dead Windows 8-era WinRT/Jupiter concept. The cDAC contract never populated meaningful data for it, and the legacy DAC also hardcodes this value to0. This cleanup removes the field from the internal managed contract surface while leaving the shipped COM struct unchanged for compatibility.Testing
build.cmd clr+libs -rc release(after cleaning stale native CMake cache directories)dotnet build src\native\managed\cdac\cdac.slnx -c Debug -m:1dotnet test src\native\managed\cdac\tests\UnitTests\Microsoft.Diagnostics.DataContractReader.Tests.csproj -c Debug --no-buildNote
This PR was generated with the assistance of GitHub Copilot.