-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzersruntime-async
Milestone
Description
This results in release build failures like:
oob-trim -> Trimming win-x64 out-of-band assemblies with ILLinker...
ApiCompat -> Comparing net10.0 reference assemblies against .NETStandard 2.x and .NETCoreApp 9.0.0...
Process terminated.
Assertion failed.
Invalid IL or a bug in the scanner
at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.WarnAboutInvalidILInMethod(MethodIL methodIl, Int32 ilOffset) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Dataflow\ReflectionMethodBodyScanner.cs:line 101
at Mono.Linker.Dataflow.MethodBodyScanner.Scan(MethodIL methodIL, InterproceduralState& interproceduralState) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Dataflow\MethodBodyScanner.cs:line 702
at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.Scan(MethodIL methodIL, InterproceduralState& interproceduralState) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Dataflow\ReflectionMethodBodyScanner.cs:line 90
at Mono.Linker.Dataflow.MethodBodyScanner.InterproceduralScan(MethodIL startingMethodIL) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Dataflow\MethodBodyScanner.cs:line 268
at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.InterproceduralScan(MethodIL methodIL) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Dataflow\ReflectionMethodBodyScanner.cs:line 81
at Mono.Linker.Steps.MarkStep.MarkReflectionLikeDependencies(MethodIL methodIL, Boolean requiresReflectionMethodBodyScanner, MessageOrigin origin) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Steps\MarkStep.cs:line 4140
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body, MessageOrigin origin) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Steps\MarkStep.cs:line 3807
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Steps\MarkStep.cs:line 3450
at Mono.Linker.Steps.MarkStep.ProcessQueue() in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Steps\MarkStep.cs:line 529
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Steps\MarkStep.cs:line 449
at Mono.Linker.Steps.MarkStep.Process() in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Steps\MarkStep.cs:line 382
at Mono.Linker.Steps.MarkStep.Process(LinkContext context) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker.Steps\MarkStep.cs:line 249
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker\Pipeline.cs:line 194
at Mono.Linker.Pipeline.Process(LinkContext context) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker\Pipeline.cs:line 182
at Mono.Linker.Driver.Run(ILogger customLogger) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker\Driver.cs:line 932
at Mono.Linker.Driver.Main(String[] args) in E:\dotnet004\runtime\src\tools\illink\src\linker\Linker\Driver.cs:line 72
The issue here is that method bodies in Task-returning methods marked as MethodImpl.Async
return an unwarapped value. (or void
if the formal return type is not generic)
Probably an easy fix.
May require teaching cecil about MethodImpl.Async
Metadata
Metadata
Assignees
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzersruntime-async
Type
Projects
Status
No status