Open
Conversation
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes correctness issues in the cDAC RuntimeTypeSystem/DacDbi surface by aligning value-type detection with CoreCLR MethodTable flags and normalizing a generic-variable check to return a strict boolean value.
Changes:
- Update
DacDbiImpl.IsValueTypeto use the RuntimeTypeSystem’s value-type classification instead of signature element type. - Add
IRuntimeTypeSystem.IsValueType(TypeHandle)and implement it inRuntimeTypeSystem_1based on MethodTable category flags (and TypeDesc element type). - Fix CoreCLR
MethodTable::ContainsGenericVariablesto returnBOOL(0/1) rather than the raw flag value.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Switches value-type query to the new RuntimeTypeSystem API for correct classification. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/RuntimeTypeSystemHelpers/MethodTableFlags_1.cs | Adds Category_ValueType_Mask and IsValueType helper aligned with CoreCLR flag semantics. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs | Implements IsValueType(TypeHandle) using MethodTable flags / TypeDesc element type. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IRuntimeTypeSystem.cs | Extends the contract interface with IsValueType. |
| src/coreclr/vm/methodtable.h | Normalizes ContainsGenericVariables to return a strict BOOL value. |
| docs/design/datacontracts/RuntimeTypeSystem.md | Documents the new IsValueType API and related flags. |
noahfalk
approved these changes
Apr 16, 2026
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
max-charlamb
approved these changes
Apr 17, 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.
ValueTypeflag on MethodTablesHasTypeParams- DAC was returning the value of a flag, cDAC was returning 1/0. Fixed native impl to return 1/0.