runtime icon indicating copy to clipboard operation
runtime copied to clipboard

JIT assert at runtime with latest coreclr

Open caslan opened this issue 10 years ago • 2 comments

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), null, Microsoft.CodeAnalysis.Platform.AnyCpu, Microsoft.CodeAnalysis.ReportDiagnostic.Default, 4, null, false, false, null, null, null); } } }

:

caslan avatar Dec 04 '15 23:12 caslan

The app needs references to Microsoft.CodeAnalysis.dll, Microsoft.CodeAnalysis.CSharp.dll and System.Collections.Immutable.dll

caslan avatar Dec 04 '15 23:12 caslan

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.

LLITCHEV avatar Dec 05 '15 02:12 LLITCHEV