-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
Bug Report: System.Runtime.InteropServices.MarshalDirectiveException in Mono Runtime
Summary
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool fails with System.Runtime.InteropServices.MarshalDirectiveException: Array size control parameter must be an integral type. when running on Mono runtime across multiple architectures (s390x and x86).
System.Runtime.InteropServices.MarshalDirectiveException: Array size control parameter must be an integral type.
at System.StubHelpers.MarshalDirectiveException.ThrowMarshalDirectiveException(String message)
at System.StubHelpers.ArrayWithOffsetMarshaler.ConvertToNative(ArrayWithOffset& managedArray, IntPtr pNativeArray)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadProjectFileWorkerAsync(String path, ProjectMap projectMap, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadProjectAsync(String projectFilePath, ProjectMap projectMap, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenProjectAsync(String projectFilePath, IProgress`1 progress, CancellationToken cancellationToken)
at Microsoft.DotNet.HotReload.Utils.Generator.BuildTool.ProjectAnalyzer.LoadProjectAsync(String projectPath)
at Microsoft.DotNet.HotReload.Utils.Generator.BuildTool.Generator.ProcessProjectAsync(String msbuildPath, String scriptPath, String configuration)
at Microsoft.DotNet.HotReload.Utils.Generator.BuildTool.Program.Main(String[] args)
at System.Runtime.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread)
at System.Threading.Tasks.Task.ExecuteFromThreadPool(Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
Environment
- Repository: dotnet/runtime
- Affected Architectures: s390x, x86 (confirmed on both)
- Runtime: Mono
- Failing Component: Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
Triggering Commit
The issue was introduced between these dependency updates in dotnet/runtime:
- Working version:
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool10.0.0-alpha.0.25302.2 (SHA: 04c41ac37048c157dafd7793f07340bc701989ce) - Failing version:
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool10.0.0-alpha.0.25465.1 (SHA: f78b12da4087ac859af919021518be7a4889ebfc)
BuildTool` 10.0.0-alpha.0.25465.1 (SHA: f78b12da4087ac859af919021518be7a4889ebfc)
Reference commit: dotnet/runtime@60a735e
attached x86 logs
Reproduction Steps
Build mono runtime on or after the commit
Expected behavior
The Microsoft.DotNet.HotReload.Utils.Generator.BuildTool should execute successfully during the dotnet/runtime build process
Actual behavior
failing with System.Runtime.InteropServices.MarshalDirectiveException: Array size control parameter must be an integral type. Microsoft.DotNet.HotReload.Utils.Generator.BuildTool exited with code 1