Skip to content

Compiler Crash with PublishAot and .NET 11 preview 4 #129093

@flucas1

Description

@flucas1

Description

The dotnet publish command fails with the stack trace shown below.
A regular build without publish workks.
If disabling PublisAot works

Reproduction Steps

Working on it... I have not been able to identify yet what causes the issue.

Expected behavior

Executable is generated.

Actual behavior

  EXEC : error : Index was outside the bounds of the array. 
          System.IndexOutOfRangeException: Index was outside the bounds of the array.
             at Internal.TypeSystem.RuntimeDeterminedType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation, Instantiation) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedType.cs:line 201
             at Internal.TypeSystem.DefType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation, Instantiation) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/DefType.RuntimeDetermined.cs:line 63
             at Internal.TypeSystem.MethodDesc.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(Instantiation, Instantiation) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/MethodDesc.RuntimeDetermined.cs:line 126
             at ILCompiler.DependencyAnalysis.MethodEntryGenericLookupResult.GetTarget(NodeFactory, GenericLookupResultContext, Boolean) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/GenericLookupResult.cs:line 627
             at ILCompiler.DependencyAnalysis.ReadyToRunGenericHelperNode.InstantiateDependencies(NodeFactory, Instantiation, Instantiation, Boolean) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ReadyToRunGenericHelperNode.cs:line 175
             at ILCompiler.DependencyAnalysis.ShadowMethodNode.GetStaticDependencies(NodeFactory) in /_/src/runtime/src/coreclr/tools/Common/Compiler/DependencyAnalysis/ShadowMethodNode.cs:line 79
             at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 182
             at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 317
             at ILCompiler.RyuJitCompilation.CompileInternal(String, ObjectDumper) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/RyuJitCompilation.cs:line 103
             at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String, ObjectDumper) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs:line 549
             at ILCompiler.Program.Run() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 655
             at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass264_0.<.ctor>b__0(ParseResult) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs:line 318

Regression?

Unknown. The code uses .NET11 specific bits (not unions)

Known Workarounds

No response

Configuration

No response

Other information

The code also targets browser-wasm. RunAOTCompilation works without issues.
I will try to gather more information. But as the timeline can be weeks I raise the bug with the stacktrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-NativeAOT-coreclrneeds-author-actionAn issue or pull request that requires more info or actions from the author.untriagedNew issue has not been triaged by the area owner

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions