Skip to content

Comments

repro#124386

Closed
pavelsavara wants to merge 1 commit intodotnet:mainfrom
pavelsavara:Struct_UnboxingStubLookup
Closed

repro#124386
pavelsavara wants to merge 1 commit intodotnet:mainfrom
pavelsavara:Struct_UnboxingStubLookup

Conversation

@pavelsavara
Copy link
Member

testing

@pavelsavara pavelsavara self-assigned this Feb 13, 2026
Copilot AI review requested due to automatic review settings February 13, 2026 15:06
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

Copy link
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 adds a regression test for a debug assertion issue in the CoreCLR's generic method lookup code. The test exercises virtual method calls on generic value types to trigger the FindTightlyBoundWrappedMethodDesc code path, which previously had a mismatch between production and debug verification implementations.

Changes:

  • Adds new regression test Struct_UnboxingStubLookup that exercises virtual methods on generic structs to trigger the assertion path
  • Test includes both direct method calls and reflection-based interface mapping to cover multiple code paths

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/tests/Loader/classloader/generics/VSD/Struct_UnboxingStubLookup.csproj Test project configuration with CLRTestPriority=0 for regression test
src/tests/Loader/classloader/generics/VSD/Struct_UnboxingStubLookup.cs Regression test implementation with generic value type interface tests

//

using System;
using System.Threading.Tasks;
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Remove the unused import using System.Threading.Tasks. The Task type is only referenced in the commented-out Main method which should also be removed.

Suggested change
using System.Threading.Tasks;

Copilot uses AI. Check for mistakes.
Comment on lines +93 to +97
/*public static Task<int> Main()
{
return Task.FromResult(TestEntryPoint());
}*/

Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Remove this commented-out Main method. The test is properly configured to run with Xunit using the [Fact] attribute on TestEntryPoint, so this legacy code should be deleted rather than left commented out.

Suggested change
/*public static Task<int> Main()
{
return Task.FromResult(TestEntryPoint());
}*/

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-coreclr NO-REVIEW Experimental/testing PR, do NOT review it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant