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

Linker throws ArgumentException when using local functions from state machine local function #2723

Closed
sbomer opened this issue Apr 4, 2022 · 0 comments · Fixed by #2722
Closed

Comments

@sbomer
Copy link
Member

sbomer commented Apr 4, 2022

Discovered in dotnet/runtime#67538. I'm filing a separate linker issue for this since it looks like the runtime issue is being used to track ci coverage holes.

ILLink : error IL1012: IL Trimmer has encountered an unexpected error. Please report the issue at https://github.com/dotnet/linker/issues [/__w/1/s/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj]
##[error]ILLink(0,0): error IL1012: (NETCORE_ENGINEERING_TELEMETRY=Build) IL Trimmer has encountered an unexpected error. Please report the issue at https://github.com/dotnet/linker/issues
  Fatal error in IL Linker
  Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: System.Void System.Net.Http.Functional.Tests.SocketsHttpHandler_Http2FlowControl_Test::<TestClientWindowScalingAsync>g__Wait|13_2(System.TimeSpan)
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
     at Mono.Linker.CompilerGeneratedState.PopulateCacheForType(TypeDefinition type)
     at Mono.Linker.CompilerGeneratedState.TryGetOwningMethodForCompilerGeneratedMember(IMemberDefinition sourceMember, MethodDefinition& owningMethod)
     at Mono.Linker.Steps.MarkStep.ShouldSuppressAnalysisWarningsForRequiresUnreferencedCode()
     at Mono.Linker.Steps.MarkStep.CheckAndReportRequiresUnreferencedCode(MethodDefinition method)
     at Mono.Linker.Steps.MarkStep.ProcessAnalysisAnnotationsForMethod(MethodDefinition method, DependencyKind dependencyKind)
     at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference, DependencyInfo reason)
     at Mono.Linker.Steps.MarkStep.MarkCustomAttribute(CustomAttribute ca, DependencyInfo& reason)
     at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider, DependencyInfo& reason)
     at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, Nullable`1 origin)
     at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
     at Mono.Linker.Steps.MarkStep.MarkEntireType(TypeDefinition type, DependencyInfo& reason)
     at Mono.Linker.Steps.MarkStep.MarkEntireType(TypeDefinition type, DependencyInfo& reason)
     at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
     at Mono.Linker.Steps.MarkStep.MarkAssembly(AssemblyDefinition assembly, DependencyInfo reason)
     at Mono.Linker.Steps.MarkStep.MarkModule(ModuleDefinition module, DependencyInfo reason)
     at Mono.Linker.Steps.MarkStep.ProcessMarkedPending()
     at Mono.Linker.Steps.MarkStep.Initialize()
     at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
     at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
     at Mono.Linker.Pipeline.Process(LinkContext context)
     at Mono.Linker.Driver.Run(ILogger customLogger, Boolean throwOnFatalLinkerException)
     at Mono.Linker.Driver.Main(String[] args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant