Skip to content

TEST#127397

Draft
rcj1 wants to merge 3 commits intodotnet:mainfrom
rcj1:test-do-not-merge-do-not-review
Draft

TEST#127397
rcj1 wants to merge 3 commits intodotnet:mainfrom
rcj1:test-do-not-merge-do-not-review

Conversation

@rcj1
Copy link
Copy Markdown
Contributor

@rcj1 rcj1 commented Apr 24, 2026

No description provided.

@rcj1 rcj1 added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Apr 24, 2026
Copilot AI review requested due to automatic review settings April 24, 2026 18:52
@rcj1 rcj1 added the NO-REVIEW Experimental/testing PR, do NOT review it label Apr 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates a DEBUG-time assertion in GetMethodTableName to include additional diagnostic details when the legacy and new implementations disagree.

Changes:

  • Adds a formatted message to a Debug.Assert comparing needed sizes and method table names.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 24, 2026 19:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

…er.Legacy/SOSDacImpl.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 24, 2026 19:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +3017 to +3022
if (!(pNeeded is null || *pNeeded == neededLocal))
{
string localNameString = new(mtNameLocal, 0, localNameLength);
string nameString = mtName is null ? string.Empty : new(mtName, 0, nameLength);
Debug.Fail($"local name = {localNameString}, name = {nameString}");
}
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pNeeded validation uses a manual if + Debug.Fail(...), which is inconsistent with the surrounding pattern in this file (other callsites use Debug.Assert(pNeeded == null || *pNeeded == neededLocal, ...)). Consider switching back to Debug.Assert with a message and include the mismatched *pNeeded/neededLocal values (and optionally count) so the failure is actionable.

Suggested change
if (!(pNeeded is null || *pNeeded == neededLocal))
{
string localNameString = new(mtNameLocal, 0, localNameLength);
string nameString = mtName is null ? string.Empty : new(mtName, 0, nameLength);
Debug.Fail($"local name = {localNameString}, name = {nameString}");
}
string localNameString = new(mtNameLocal, 0, localNameLength);
string nameString = mtName is null ? string.Empty : new(mtName, 0, nameLength);
Debug.Assert(
pNeeded is null || *pNeeded == neededLocal,
$"pNeeded mismatch: actual={(pNeeded is null ? "null" : (*pNeeded).ToString())}, expected={neededLocal}, count={count}, local name = {localNameString}, name = {nameString}");

Copilot uses AI. Check for mistakes.
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Diagnostics-coreclr NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants