Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Generic method static virtuals with default implementation behaves fails to compile #89101

@davidwrighton

Description

@davidwrighton

Description

When compiling the Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj test on the windows-x64 Checked NativeAOT PR test leg, the test fails to build. This test is new with PR
#89061 In the PR, I will disable this test for AOT compilation, so repro'ing it will require re-enabling the test.

Reproduction Steps

Attempt to compile the test for native aot in conditions equivalent to the windows-x64 Checked NativeAOT PR test leg.

Expected behavior

Test compiles and runs correctly

Actual behavior

Test fails with the following call stack

2023-07-18T01:16:07.2409969Z     Unhandled Exception: System.Diagnostics.DebugProvider+DebugAssertException:    at System.Diagnostics.DebugProvider.Fail(String, String) + 0x37
2023-07-18T01:16:07.2745593Z        at System.Diagnostics.Debug.Fail(String, String) + 0x32
2023-07-18T01:16:07.3004774Z        at ILCompiler.DependencyAnalysis.GenericVirtualMethodImplNode..ctor(MethodDesc) + 0xb0
2023-07-18T01:16:07.3042616Z        at ILCompiler.DependencyAnalysis.NodeFactory.<>c.<CreateNodeCaches>b__38_17(MethodDesc method) + 0x23
2023-07-18T01:16:07.3213051Z        at ILCompiler.DependencyAnalysis.GVMDependenciesNode.SearchDynamicDependencies(List`1, Int32, NodeFactory) + 0x6a5
2023-07-18T01:16:07.3283770Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.DynamicDependencyNode.MarkNewDynamicDependencies(DependencyAnalyzer`2) + 0x43
2023-07-18T01:16:07.3292593Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() + 0x251
2023-07-18T01:16:07.3304774Z        at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0x4b
2023-07-18T01:16:07.3315794Z        at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan() + 0x14
2023-07-18T01:16:07.3328324Z        at ILCompiler.Program.<Run>g__RunScanner|4_0(Program.<>c__DisplayClass4_0&) + 0x18b
2023-07-18T01:16:07.3370343Z        at ILCompiler.Program.Run() + 0x22a8
2023-07-18T01:16:07.3436919Z        at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass221_0.<.ctor>b__0(ParseResult result) + 0x31d
2023-07-18T01:16:07.3477815Z        at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult) + 0xa5
2023-07-18T01:16:07.3524685Z        at ilc!<BaseAddress>+0x83e97c
2023-07-18T01:16:07.6055018Z     CctorThrowInlinedStatic -> D:\a\_work\1\s\artifacts\tests\coreclr\windows.x64.Checked\Loader\classloader\TypeInitialization\CctorsWithSideEffects\CctorThrowInlinedStatic\CctorThrowInlinedStatic.dll
2023-07-18T01:16:09.7164270Z     Generating native code
2023-07-18T01:16:10.1492821Z     Generating native code
2023-07-18T01:16:13.0582306Z D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\build\Microsoft.NETCore.Native.targets(297,5): error MSB3073: The command ""D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\ilc-published\\ilc" @"D:\a\_work\1\s\artifacts\tests\coreclr/obj/windows.x64.Checked/Managed/Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation\native\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.ilc.rsp"" exited with code 57005. [D:\a\_work\1\s\src\tests\Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj] [D:\a\_work\1\s\src\tests\build.proj]
2023-07-18T01:16:13.0631667Z ##[error]artifacts\bin\coreclr\windows.x64.Checked\build\Microsoft.NETCore.Native.targets(297,5): error MSB3073: The command ""D:\a\_work\1\s\artifacts\bin\coreclr\windows.x64.Checked\ilc-published\\ilc" @"D:\a\_work\1\s\artifacts\tests\coreclr/obj/windows.x64.Checked/Managed/Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation\native\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.ilc.rsp"" exited with code 57005. [D:\a\_work\1\s\src\tests\Loader\classloader\StaticVirtualMethods\RegressionTests\StaticVirtualsAndMethodConstraintsAndDefaultImplementation.csproj]

Regression?

No

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions