Repository navigation
Implement IXCLRDataTypeDefinition metadata methods in cDAC - #131365
Merged
rcj1 merged 14 commits intoJul 30, 2026
Merged
Conversation
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
noahfalk
approved these changes
Jul 27, 2026
Contributor
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataTypeDefinition.cs:123
- In the DEBUG cross-validation,
new(nameBuf)assumesnameBufis null-terminated. If the caller passes a non-null buffer withbufLen == 0,CopyStringToBufferwon't write a terminator andnew string(nameBuf)can read past the caller’s buffer and crash/debug-assert unpredictably. Guard the string comparisons onbufLen > 0(or otherwise ensure termination) before constructing strings from the caller-provided pointer.
if (nameBuf is not null)
{
string dacName = new(pNameBufLocal);
string cdacName = new(nameBuf);
Debug.Assert(dacName == cdacName, $"cDAC: {cdacName}, DAC: {dacName}");
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
noahfalk
approved these changes
Jul 29, 2026
hoyosjs
approved these changes
Jul 29, 2026
Contributor
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (1)
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataTypeDefinition.cs:124
- In the DEBUG cross-validation block, the string comparison uses
new string(nameBuf)even whenbufLen == 0. In that caseOutputBufferHelpers.CopyStringToBufferdoesn't write a null terminator, andnew string(char*)can read past the caller-provided buffer (potential AV) during debug-only validation. Guard the string construction/comparison so it only runs when there is at least 1 character of buffer.
if (nameBuf is not null)
{
string dacName = new(pNameBufLocal);
string cdacName = new(nameBuf);
Debug.Assert(dacName == cdacName, $"cDAC: {cdacName}, DAC: {dacName}");
}
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
rcj1
enabled auto-merge (squash)
July 29, 2026 22:53
rcj1
deleted the
copilot/draft-implement-getcorelementtype-getname-gettoken
branch
July 30, 2026 01:14
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.
Implements cDAC-backed
GetCorElementType,GetName, andGetTokenAndScopeforIXCLRDataTypeDefinition.Changes
ClrDataTypeDefinition.Note
This description was generated by GitHub Copilot.