Repository navigation
[cDAC] Avoid exception-based GetTypeParam probing - #130732
Merged
max-charlamb merged 1 commit intoJul 15, 2026
Merged
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: f2aa5dc4-0c99-43f0-af14-734143849c4a
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the legacy cDAC SOS field descriptor projection logic to avoid using ArgumentException as control flow when determining whether a TypeHandle has a type parameter before calling GetTypeParam.
Changes:
- Replaces
try { GetTypeParam } catch (ArgumentException)probing with an explicitHasTypeParamcheck. - Preserves prior
MTOfTypeselection behavior for arrays, type-descs-with-type-params, and non-array MethodTables.
max-charlamb
marked this pull request as ready for review
July 15, 2026 01:07
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
max-charlamb
enabled auto-merge (squash)
July 15, 2026 01:14
rcj1
approved these changes
Jul 15, 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 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
HasTypeParampredicate before callingGetTypeParamin SOS field descriptor projection.ArgumentExceptionas normal control flow.Validation
dotnet build src\native\managed\cdac\cdac.slnx -c Debug -p:UseSharedCompilation=false /nr:false(final run: 0 warnings, 0 errors)dotnet test src\native\managed\cdac\tests\UnitTests\Microsoft.Diagnostics.DataContractReader.Tests.csproj -c Debug --no-build(2697 passed, 16 skipped)TypeDescTestsrun (16 passed)Note
This PR was generated with the assistance of GitHub Copilot.