Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NativeAOT] Failed to compile WinRT project #102259

Closed
hez2010 opened this issue May 15, 2024 · 1 comment · Fixed by #102299
Closed

[NativeAOT] Failed to compile WinRT project #102259

hez2010 opened this issue May 15, 2024 · 1 comment · Fixed by #102299
Assignees
Milestone

Comments

@hez2010
Copy link
Contributor

hez2010 commented May 15, 2024

Description

WinRT project failed to build while compiling with NativeAOT.

Index was outside the bounds of the array.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Internal.Runtime.CompilerHelpers.ThrowHelpers.ThrowIndexOutOfRangeException() + 0x24
   at Internal.TypeSystem.RuntimeDeterminedType.GetNonRuntimeDeterminedTypeFromRuntimeDeterminedSubtypeViaSubstitution(Instantiation, Instantiation) + 0x62
   at Internal.TypeSystem.MethodDesc.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(Instantiation, Instantiation) + 0x87
   at ILCompiler.DependencyAnalysis.MethodEntryGenericLookupResult.GetTarget(NodeFactory, GenericLookupResultContext) + 0x34
   at ILCompiler.DependencyAnalysis.ReadyToRunGenericHelperNode.InstantiateDependencies(NodeFactory, Instantiation, Instantiation) + 0x3e4
   at ILCompiler.DependencyAnalysis.ShadowConcreteMethodNode.GetStaticDependencies(NodeFactory) + 0x19b
   at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1) + 0x4f
   at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0xec
   at ILCompiler.RyuJitCompilation.CompileInternal(String, ObjectDumper) + 0x26
   at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String, ObjectDumper) + 0x5d
   at ILCompiler.Program.Run() + 0x2bee
   at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass240_0.<.ctor>b__0(ParseResult result) + 0x33c

Reproduction Steps

4243217485_WinRTServerTest.zip

Expected behavior

No exception while building.

Actual behavior

An exception occurred during building.

Regression?

Yes. Doesn't reproduce on .NET 8.

Known Workarounds

No.

Configuration

.NET 9 nightly: 9.0.100-preview.5.24264.22

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 15, 2024
Copy link
Contributor

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

@agocke agocke added this to the 9.0.0 milestone May 15, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label May 15, 2024
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this issue May 16, 2024
Fixes dotnet#102259.

Delegate creation requires form of lookups that are hard to express across inlined generics.

This was introduced when we started doing more generic inlining in dotnet#99265. I [suspected](dotnet#99265 (comment)) things might not be correct here but assumed we'd have test coverage for sure. _Now_ we have test coverage.
MichalStrehovsky added a commit that referenced this issue May 16, 2024
Fixes #102259.

Delegate creation requires form of lookups that are hard to express across inlined generics.

This was introduced when we started doing more generic inlining in #99265. I [suspected](#99265 (comment)) things might not be correct here but assumed we'd have test coverage for sure. _Now_ we have test coverage.
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this issue May 30, 2024
Fixes dotnet#102259.

Delegate creation requires form of lookups that are hard to express across inlined generics.

This was introduced when we started doing more generic inlining in dotnet#99265. I [suspected](dotnet#99265 (comment)) things might not be correct here but assumed we'd have test coverage for sure. _Now_ we have test coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants