JIT assert at runtime with latest coreclr
With coreclr sources from 12/3, the code below asserts with debug coreclr at runtime:
Assert failure(PID 29604 [0x000073a4], Thread: 29604 [0x73a4]): Assertion failed 'op2->TypeGet() == TYP_STRUCT' in 'Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions:.ctor(int,bool,ref,ref,ref,ref,int,bool,bool,ref,ref,struct,struct,int,int,int,ref,bool,bool,bool,bool,ref,ref,ref,ref,ref,ubyte):this' (IL size 80)
File: /home/cagri/coreclr-master/src/jit/importer.cpp Line: 13640
Image: /home/cagri/coreclrdemo/runtime/corerun
**** MessageBox invoked, title 'corerun - Assert Failure (PID 29604, Thread 29604/0x73a4)' **** Assertion failed 'op2->TypeGet() == TYP_STRUCT' in 'Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions:.ctor(int,bool,ref,ref,ref,ref,int,bool,bool,ref,ref,struct,struct,int,int,int,ref,bool,bool,bool,bool,ref,ref,ref,ref,ref,ubyte):this' (IL size 80)
/home/cagri/coreclr-master/src/jit/importer.cpp, Line: 13640
Abort - Kill program Retry - Debug Ignore - Keep running
The issue doesn't repro with coreclr from about a month ago.
The code running:
using Microsoft.CodeAnalysis.CSharp; using System.Collections.Immutable;
namespace JITBugTest
{
class Program
{
static void Main(string[] args)
{
CSharpCompilationOptions options = new CSharpCompilationOptions(
Microsoft.CodeAnalysis.OutputKind.DynamicallyLinkedLibrary,
true,
null,
null,
null,
null,
Microsoft.CodeAnalysis.OptimizationLevel.Debug,
false,
false,
null,
null,
default(ImmutableArray
:
The app needs references to Microsoft.CodeAnalysis.dll, Microsoft.CodeAnalysis.CSharp.dll and System.Collections.Immutable.dll
Thanks for the small repro! This is a benign assertion failure. The release build is fine. A potential workaround is to export the following variable. export COMPlus_JitEnableNoWayAssert=0 Working on a more friendly solution.