[Mono-bugs] [Bug 610074] New: SIGSEGV due to incomplete enums during mscorlib bootstrap

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 28 18:14:17 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=610074

http://bugzilla.novell.com/show_bug.cgi?id=610074#c0


           Summary: SIGSEGV due to incomplete enums during mscorlib
                    bootstrap
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: robertj at gmx.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3)
Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729; .NET4.0E)

This is caused by a specific compilation order that can be reproduced with the
steps below.

The offending enums are:

System.Runtime.InteropServices.CharSet
System.Runtime.InteropServices.CallingConvention

For both, the following expression is true:

    class->element_class == class

which is causing  mono_class_enum_basetype() to return NULL.


Reproducible: Always

Steps to Reproduce:

cd mcs/class/corlib
touch corlib.dll.linux-excludes
make clean
LC_ALL=C make

Actual Results:  
MCS     [net_2_0] mscorlib.dll
Stacktrace:

  at (wrapper managed-to-native) System.Type.GetTypeCodeInternal (System.Type)
<0x00004>
  at (wrapper managed-to-native) System.Type.GetTypeCodeInternal (System.Type)
<0x00004>
  at System.Type.GetTypeCodeImpl () <0x0007d>
  at System.Type.GetTypeCode (System.Type) <0x0001c>
  at System.Reflection.Emit.CustomAttributeBuilder.decode_cattr_value
(System.Type,byte[],int,int&) <0x00018>
  at System.Reflection.Emit.CustomAttributeBuilder.decode_cattr
(System.Reflection.Emit.CustomAttributeBuilder) <0x002d9>
  at System.Reflection.Emit.MethodBuilder.SetCustomAttribute
(System.Reflection.Emit.CustomAttributeBuilder) <0x001a5>
  at System.Reflection.Emit.MethodBuilder.SetCustomAttribute
(System.Reflection.ConstructorInfo,byte[]) <0x0004d>
  at Mono.CSharp.MethodOrOperator.ApplyAttributeBuilder
(Mono.CSharp.Attribute,Mono.CSharp.MethodSpec,byte[],Mono.CSharp.PredefinedAttributes)
<0x001bc>
  at Mono.CSharp.Method.ApplyAttributeBuilder
(Mono.CSharp.Attribute,Mono.CSharp.MethodSpec,byte[],Mono.CSharp.PredefinedAttributes)
<0x002d9>
  at Mono.CSharp.Attribute.Emit
(System.Collections.Generic.Dictionary`2<Mono.CSharp.Attribute,
System.Collections.Generic.List`1<Mono.CSharp.Attribute>>) <0x007c5>
  at Mono.CSharp.Attributes.Emit () <0x00130>
  at Mono.CSharp.MethodOrOperator.Emit () <0x00288>
  at Mono.CSharp.Method.Emit () <0x0024c>
  at Mono.CSharp.TypeContainer.EmitType () <0x0061f>
  at Mono.CSharp.RootContext.EmitCode () <0x0011f>
  at Mono.CSharp.Driver.Compile () <0x00630>
  at Mono.CSharp.Driver.Main (string[]) <0x000a2>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object
(object,intptr,intptr,intptr) <0x00043>



Expected Results:  
No crash.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list