-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzersin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
dotnet/BenchmarkDotNet#1960 (comment)
[2022/03/28 17:20:11][INFO] Unhandled exception. System.InvalidOperationException: Operation is not valid due to the current state of the object.
[2022/03/28 17:20:11][INFO] at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.GetValueNodeForCustomAttributeArgument(CustomAttributeArgument argument)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.ProcessAttributeDataflow(MethodDefinition method, IList`1 arguments)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkCustomAttributeArguments(CustomAttribute ca)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkCustomAttribute(CustomAttribute ca, DependencyInfo& reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider, DependencyInfo& reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkEntireType(TypeDefinition type, DependencyInfo& reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkAssembly(AssemblyDefinition assembly, DependencyInfo reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkModule(ModuleDefinition module, DependencyInfo reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, Nullable`1 origin)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, Nullable`1 origin)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, Nullable`1 origin)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkField(FieldDefinition field, DependencyInfo& reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkEntireType(TypeDefinition type, DependencyInfo& reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkEntireType(TypeDefinition type, DependencyInfo& reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkEntireAssembly(AssemblyDefinition assembly)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkAssembly(AssemblyDefinition assembly, DependencyInfo reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.MarkModule(ModuleDefinition module, DependencyInfo reason)
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.ProcessMarkedPending()
[2022/03/28 17:20:11][INFO] at Mono.Linker.Steps.MarkStep.Initialize()
I think the bug is here:
This falls into the Cecil footgun that resolving the type removes any signs of it ever being a constructed/parameterized type.
Metadata
Metadata
Assignees
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzersin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Type
Projects
Status
No status