[Mono-bugs] [Bug 79379][Maj] New - [GMCS] runtime crashes on trivial generic code generated by CSC

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 12 10:25:17 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jan.oravec at 6com.sk.

http://bugzilla.ximian.com/show_bug.cgi?id=79379

--- shadow/79379	2006-09-12 10:25:17.000000000 -0400
+++ shadow/79379.tmp.19801	2006-09-12 10:25:17.000000000 -0400
@@ -0,0 +1,185 @@
+Bug#: 79379
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: jan.oravec at 6com.sk               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] runtime crashes on trivial generic code generated by CSC
+
+When the attached a.cs is compiled with CSC 8.00.50727.42, framework
+2.0.50727 into (also attached) a.dll, then both of this fails:
+
+1)
+
+gmcs b.cs -r:a.dll
+
+Fails with:
+=================================================================
+Got a SIGSEGV while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries
+used by your application.
+=================================================================
+
+Stacktrace:
+
+  at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetType
+(System.Reflection.Module,string,bool,bool) <0x0000e>
+  at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetType
+(System.Reflection.Module,string,bool,bool) <0xffffffff>
+  at System.Reflection.Assembly.GetType (string,bool,bool) <0x0003f>
+  at System.Reflection.Assembly.GetType (string) <0x00027>
+  at Mono.CSharp.RootNamespace.GetTypeInAssembly
+(System.Reflection.Assembly,string) <0x00030>
+  at Mono.CSharp.GlobalRootNamespace.LookupTypeReflection
+(string,Mono.CSharp.Location) <0x00098>
+  at Mono.CSharp.Namespace.LookupType (string,Mono.CSharp.Location) <0x00186>
+  at Mono.CSharp.Namespace.Lookup
+(Mono.CSharp.DeclSpace,string,Mono.CSharp.Location) <0x0009f>
+  at Mono.CSharp.NamespaceEntry.Lookup
+(Mono.CSharp.DeclSpace,string,Mono.CSharp.Location,bool) <0x00087>
+  at Mono.CSharp.NamespaceEntry.LookupNamespaceOrType
+(Mono.CSharp.DeclSpace,string,Mono.CSharp.Location,bool) <0x00065>
+  at Mono.CSharp.DeclSpace.LookupType (string,Mono.CSharp.Location,bool)
+<0x00140>
+  at Mono.CSharp.DeclSpace.LookupType (string,Mono.CSharp.Location,bool)
+<0x00105>
+  at Mono.CSharp.SimpleName.ResolveAsTypeStep
+(Mono.CSharp.IResolveContext,bool) <0x00134>
+  at Mono.CSharp.Expression.ResolveAsBaseTerminal
+(Mono.CSharp.IResolveContext,bool) <0x0004d>
+  at Mono.CSharp.Expression.ResolveAsTypeTerminal
+(Mono.CSharp.IResolveContext,bool) <0x00044>
+  at Mono.CSharp.LocalInfo.Resolve (Mono.CSharp.EmitContext) <0x0003b>
+  at Mono.CSharp.Block.ResolveMeta
+(Mono.CSharp.ToplevelBlock,Mono.CSharp.EmitContext,Mono.CSharp.Parameters)
+<0x002a5>  at Mono.CSharp.ToplevelBlock.ResolveMeta
+(Mono.CSharp.EmitContext,Mono.CSharp.Parameters) <0x00062>
+  at Mono.CSharp.EmitContext.ResolveTopBlock
+(Mono.CSharp.EmitContext,Mono.CSharp.ToplevelBlock,Mono.CSharp.Parameters,Mono.CSharp.IMethodData,bool&)
+<0x00155>
+  at Mono.CSharp.EmitContext.EmitTopBlock
+(Mono.CSharp.IMethodData,Mono.CSharp.ToplevelBlock) <0x00072>
+  at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace) <0x001c5>
+  at Mono.CSharp.Method.Emit () <0x00021>
+  at Mono.CSharp.TypeContainer.EmitType () <0x003c2>
+  at Mono.CSharp.RootContext.EmitCode () <0x002b3>
+  at Mono.CSharp.Driver.MainDriver (string[]) <0x00eed>
+  at Mono.CSharp.Driver.Main (string[]) <0x00079>
+  at (wrapper runtime-invoke) System.Object.runtime_invoke_int_string[]
+(object,intptr,intptr,intptr) <0xffffffff>
+
+Native stacktrace:
+
+        /home/shared/mono//bin/mono(mono_handle_native_sigsegv+0xe4) [0x51dee4]
+        /home/shared/mono//bin/mono [0x5085b1]
+        /lib/libpthread.so.0 [0x2b255eff8e80]
+        /home/shared/mono//bin/mono [0x4b8479]
+        /home/shared/mono//bin/mono(mono_class_get_full+0xe7) [0x4b4b17]
+       
+/home/shared/mono//bin/mono(mono_metadata_load_generic_param_constraints+0x13b)
+[0x45df2b]
+        /home/shared/mono//bin/mono [0x4b51a7]
+        /home/shared/mono//bin/mono(mono_class_get_full+0xad) [0x4b4add]
+        /home/shared/mono//bin/mono [0x45a645]
+        /home/shared/mono//bin/mono(mono_metadata_parse_type_full+0x144)
+[0x45aa64]
+        /home/shared/mono//bin/mono [0x45a6c1]
+        /home/shared/mono//bin/mono(mono_type_create_from_typespec+0xde)
+[0x45d1ae]
+        /home/shared/mono//bin/mono(mono_class_get_full+0xbf) [0x4b4aef]
+        /home/shared/mono//bin/mono [0x45bbd9]
+        /home/shared/mono//bin/mono [0x4b5277]
+        /home/shared/mono//bin/mono(mono_class_get_full+0xad) [0x4b4add]
+        /home/shared/mono//bin/mono [0x45a645]
+        /home/shared/mono//bin/mono(mono_metadata_parse_type_full+0x144)
+[0x45aa64]
+        /home/shared/mono//bin/mono [0x45a6c1]
+        /home/shared/mono//bin/mono(mono_type_create_from_typespec+0xde)
+[0x45d1ae]
+        /home/shared/mono//bin/mono(mono_class_get_full+0xbf) [0x4b4aef]
+        /home/shared/mono//bin/mono [0x45bbd9]
+        /home/shared/mono//bin/mono [0x4b5277]
+        /home/shared/mono//bin/mono(mono_class_get_full+0xad) [0x4b4add]
+        /home/shared/mono//bin/mono(mono_class_from_name+0xf1) [0x4b4321]
+        /home/shared/mono//bin/mono [0x48b69e]
+        /home/shared/mono//bin/mono(mono_reflection_get_type+0x30) [0x48b7b0]
+        /home/shared/mono//bin/mono [0x4a42f4]
+        [0x4029a3be]
+
+
+2)
+
+Compile also b.cs into (attached) b.exe, and:
+
+mono b.exe
+
+Fails with:
+
+=================================================================
+Got a SIGSEGV while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries
+used by your application.
+=================================================================
+
+Stacktrace:
+
+
+Native stacktrace:
+
+        mono(mono_handle_native_sigsegv+0xe4) [0x51dee4]
+        mono [0x5085b1]
+        /lib/libpthread.so.0 [0x2b1b2456ae80]
+        mono [0x4b8479]
+        mono(mono_class_get_full+0xe7) [0x4b4b17]
+        mono(mono_metadata_load_generic_param_constraints+0x13b) [0x45df2b]
+        mono [0x4b51a7]
+        mono(mono_class_get_full+0xad) [0x4b4add]
+        mono [0x45a645]
+        mono(mono_metadata_parse_type_full+0x144) [0x45aa64]
+        mono [0x45a6c1]
+        mono(mono_type_create_from_typespec+0xde) [0x45d1ae]
+        mono(mono_class_get_full+0xbf) [0x4b4aef]
+        mono [0x45bbd9]
+        mono [0x4b5277]
+        mono(mono_class_get_full+0xad) [0x4b4add]
+        mono [0x45a645]
+        mono(mono_metadata_parse_type_full+0x144) [0x45aa64]
+        mono [0x45a6c1]
+        mono(mono_type_create_from_typespec+0xde) [0x45d1ae]
+        mono(mono_class_get_full+0xbf) [0x4b4aef]
+        mono [0x45bbd9]
+        mono [0x4b5277]
+        mono(mono_class_get_full+0xad) [0x4b4add]
+        mono(mono_class_from_name+0xf1) [0x4b4321]
+        mono(mono_class_from_typeref+0xd9) [0x4b47f9]
+        mono(mono_class_get_full+0x82) [0x4b4ab2]
+        mono [0x45a645]
+        mono(mono_metadata_parse_type_full+0x144) [0x45aa64]
+        mono [0x45a6c1]
+        mono(mono_metadata_parse_type_full+0x144) [0x45aa64]
+        mono(mono_metadata_parse_mh_full+0x167) [0x45b3b7]
+        mono(mono_method_get_header+0xe7) [0x497da7]
+        mono [0x5063c7]
+        mono [0x507df7]
+        mono [0x50842d]
+        mono(mono_runtime_exec_main+0x62) [0x49af92]
+        mono(mono_runtime_run_main+0x1fb) [0x49b2bb]
+        mono(mono_main+0xe12) [0x419eb2]
+        /lib/libc.so.6(__libc_start_main+0xf6) [0x2b1b247ea136]
+        mono(fmod+0x82) [0x418b6a]
+Aborted
+
+
+The code works fine when both a.cs and b.cs are compiled with gmcs.
+
+I have tested it with SVN revision 65185.


More information about the mono-bugs mailing list