[Mono-list] Stack overflow during compilation

Mattias Jiderhamn mj-lists at expertsystems.se
Fri May 13 09:35:53 UTC 2016


Hi list. I'm trying to compile an existing .NET project (i.e. works fine 
w/ msbuild) with Mono/xbuild for the first time, which ends with the 
compiler crashing with the error below.
Because of the "CStrExpression" I tried commenting out any CStr calls in 
our code, but that didn't make any difference, so my guess is this is 
created automatically from some literals.

I'm doing the compilation using the official Docker image; tried both 
tags lastest=4.2.3.4 and onbuild=4.2.3.4-onbuild with same result.

/verbosity:diagnostic didn't seem to add anything useful
How can I continue debugging this (i.e. find which source file is 
triggering this and determine if it is a bug in the Mono compiler or 
some obscurity in our code)?

(FYI: I'm mainly a Java developer and this integration component is the 
only real .NET project I have experience from, meaning I may need 
detailed explanation of .NET specific concepts - sorry!)


Here is the error
                 Stack overflow: IP: 0x40f265e3, fault addr: 0x7ffc27d68ff8
                 Stacktrace:
                 at vbnc.VariableClassification.GetConstant 
(object&,bool) <0x00077>
                 <...>
                 at vbnc.VariableToValueExpression.GetConstant 
(object&,bool) <0x0002b>
                 at vbnc.CStrExpression.GetConstant (object&,bool) <0x00035>
                 at vbnc.CStrExpression.GetConstant (object&,bool) <0x00035>
                 at vbnc.CStrExpression.GetConstant (object&,bool) <0x00035>
[repeated 17500+ times]
                 at vbnc.CStrExpression.GetConstant (object&,bool) <0x00035>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x0007b>
                 at vbnc.ValueClassification.GenerateCode 
(vbnc.EmitInfo) <0x0005b>
                 at vbnc.ConversionExpression.GenerateCodeForExpression 
(vbnc.ConversionExpression,vbnc.EmitInfo,System.TypeCode&,Mono.Cecil.TypeReference&) 
<0x000b8>
                 at vbnc.CStrExpression.GenerateCode 
(vbnc.ConversionExpression,vbnc.EmitInfo) <0x00063>
                 at vbnc.CStrExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00013>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ValueClassification.GenerateCode 
(vbnc.EmitInfo) <0x0005b>
                 at vbnc.ConversionExpression.GenerateCodeForExpression 
(vbnc.ConversionExpression,vbnc.EmitInfo,System.TypeCode&,Mono.Cecil.TypeReference&) 
<0x000b8>
                 at vbnc.CStrExpression.GenerateCode 
(vbnc.ConversionExpression,vbnc.EmitInfo) <0x00063>
                 at vbnc.CStrExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00013>
[repeated 15500+ times]
                 at vbnc.CStrExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00013>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ConcatExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x00073>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ValueClassification.GenerateCode 
(vbnc.EmitInfo) <0x0005b>
                 at vbnc.ConversionExpression.GenerateCodeForExpression 
(vbnc.ConversionExpression,vbnc.EmitInfo,System.TypeCode&,Mono.Cecil.TypeReference&) 
<0x000b8>
                 at vbnc.CStrExpression.GenerateCode 
(vbnc.ConversionExpression,vbnc.EmitInfo) <0x00063>
                 at vbnc.CTypeExpression.GenerateCodeInternal 
(vbnc.EmitInfo) <0x010d7>
                 at vbnc.Expression.GenerateCode (vbnc.EmitInfo) <0x00270>
                 at vbnc.ValueClassification.GenerateCode 
(vbnc.EmitInfo) <0x0005b>
                 at vbnc.VariableExpression.Emit 
(vbnc.EmitInfo,Mono.Cecil.Cil.VariableDefinition) <0x0008c>
                 at vbnc.VariableClassification.GenerateCode 
(vbnc.EmitInfo) <0x003c3>
                 at vbnc.AssignmentStatement.GenerateCode 
(vbnc.EmitInfo) <0x00055>
                 at vbnc.CodeBlock.GenerateCode (vbnc.EmitInfo) <0x001ff>
                 at vbnc.IfStatement.GenerateCode (vbnc.EmitInfo) <0x00146>
                 at vbnc.CodeBlock.GenerateCode (vbnc.EmitInfo) <0x001ff>
                 at vbnc.CodeBlock.GenerateCode (vbnc.IMethod) <0x0017b>
                 at vbnc.MethodBaseDeclaration.GenerateCode 
(vbnc.EmitInfo) <0x00143>
                 at vbnc.MethodDeclaration.GenerateCode (vbnc.EmitInfo) 
<0x00037>
                 at vbnc.SubDeclaration.GenerateCode (vbnc.EmitInfo) 
<0x000bb>
                 at vbnc.Helper.GenerateCodeCollection 
(System.Collections.IEnumerable,vbnc.EmitInfo) <0x001fd>
                 at vbnc.BaseObjects`1<T_REF>.GenerateCode 
(vbnc.EmitInfo) <0x00013>
                 at vbnc.AssemblyDeclaration.Emit (vbnc.TypeDeclaration) 
<0x0007f>
                 at vbnc.AssemblyDeclaration.Emit () <0x0018b>
                 at vbnc.Compiler.Compile () <0x00e0f>
                 at vbnc.Compiler.Compile (string[]) <0x000a7>
                 at vbnc.Main.Main (string[]) <0x000e3>
                 at (wrapper runtime-invoke) 
<Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) 
<0xffffffff>
                 Tool /usr/lib/mono/4.5/vbnc.exe execution finished.
/usr/lib/mono/xbuild/12.0/bin/Microsoft.VisualBasic.targets: error : 
Compiler crashed with code: 1.
             Task "Vbc" execution -- FAILED

-- 

   </Mattias>



More information about the Mono-list mailing list