[Mono-bugs] [Bug 368294] New: Runtime crashes when loading .NET assembly

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Mar 7 15:00:05 EST 2008


           Summary: Runtime crashes when loading .NET assembly
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

1. compile this using gmcs

using System;

using System.Reflection;

public class C


        public static void Main (string[] args)


                Assembly a = Assembly.LoadFile (args[0]);
                Console.WriteLine (a.FullName);

                Print (a.GetType ("System.Attribute"));

                Print (a.GetType ("System.Int32"));

                Print (a.GetType ("System.Int64"));


        static void Print (Type t)


                Console.WriteLine (t.FullName);

                Console.WriteLine (t.Assembly.FullName);



2. run using enclosed assembly

mono test-1000.exe mylib.dll

Expected results:

mylib, Version=, Culture=neutral, PublicKeyToken=null
mylib, Version=, Culture=neutral, PublicKeyToken=null
mylib, Version=, Culture=neutral, PublicKeyToken=null
mylib, Version=, Culture=neutral, PublicKeyToken=null

Actual results:

Runtime crashes with


  at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetType
(System.Reflection.Module,string,bool,bool) <0x00004>
  at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetType
(System.Reflection.Module,string,bool,bool) <0xffffffff>
  at System.Reflection.Assembly.GetType (string,bool,bool) <0x00026>
  at System.Reflection.Assembly.GetType (string) <0x00014>
  at C.Main (string[]) <0x0003b>
  at (wrapper runtime-invoke) C.runtime_invoke_void_string[]
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x81801de]
        mono [0x807f731]
        mono [0x80f20f3]
        mono [0x80f236c]
        mono [0x810d1d1]
        mono(mono_runtime_exec_main+0xbb) [0x80b690b]
        mono(mono_runtime_run_main+0x1ba) [0x80b7d1a]
        mono(mono_main+0xfe2) [0x805b822]
        mono [0x805a332]
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7ccf050]
        mono [0x805a2a1]

Debug info from gdb:

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1211402544 (LWP 13667)]
[New Thread -1221223536 (LWP 13669)]
[New Thread -1215435888 (LWP 13668)]
0xffffe410 in __kernel_vsyscall ()
  3 Thread -1215435888 (LWP 13668)  0xffffe410 in __kernel_vsyscall ()
  2 Thread -1221223536 (LWP 13669)  0xffffe410 in __kernel_vsyscall ()
  1 Thread -1211402544 (LWP 13667)  0xffffe410 in __kernel_vsyscall ()

Thread 3 (Thread -1215435888 (LWP 13668)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e349f6 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x081152d1 in collection_thread (unused=0x0) at collection.c:34
#3  0xb7e2d46b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7d8c6de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread -1221223536 (LWP 13669)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e31676 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0812350f in timedwait_signal_poll_cond (cond=0xb78531dc, 
    mutex=0xb78531c4, timeout=0x0, alertable=0) at handles.c:1443
#3  0x08125faf in _wapi_handle_timedwait_signal_handle (handle=0x404, 
    timeout=0x0, alertable=0) at handles.c:1523
#4  0x0812602c in _wapi_handle_wait_signal_handle (handle=0x404, alertable=0)
    at handles.c:1483
#5  0x08128dbf in WaitForSingleObjectEx (handle=0x404, timeout=4294967295, 
    alertable=0) at wait.c:200
#6  0x08113eca in finalizer_thread (unused=0x0) at gc.c:894
#7  0x080e76ef in start_wrapper (data=0x82787b8) at threads.c:589
#8  0x081216c2 in thread_start_routine (args=0xb7702480) at threads.c:282
#9  0x0813b355 in GC_start_routine (arg=0x26f40) at pthread_support.c:1369
#10 0xb7e2d46b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7d8c6de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1211402544 (LWP 13667)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d852a1 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7ea4780 in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
#3  0xb7ea4b4c in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
#4  0x08180279 in mono_handle_native_sigsegv (signal=11, ctx=0xb7b87d0c)
    at mini-exceptions.c:1046
#5  0x0807f731 in mono_arch_handle_altstack_exception (sigctx=0xb7b87d0c, 
    fault_addr=0x19, stack_ovf=0) at exceptions-x86.c:855
#6  <signal handler called>
#7  mono_class_init (class=0x829581c) at class.c:3601
#8  0x080f20f3 in mono_reflection_get_type_internal (rootimage=0x8295cd8, 
    image=<value optimized out>, info=0xbf953558, ignorecase=0)
    at reflection.c:6473
#9  0x080f236c in mono_reflection_get_type_with_rootimage (
    rootimage=0x8295cd8, image=0x82c3444, info=0xbf953558, ignorecase=0, 
    type_resolve=0xbf953554) at reflection.c:6578
#10 0x0810d1d1 in ves_icall_System_Reflection_Assembly_InternalGetType (
    assembly=0x30f90, module=0x0, name=0x49fc0, throwOnError=0 '\0', 
    ignoreCase=0 '\0') at icall.c:4072
#11 0xb78e5397 in ?? ()
#12 0x00030f90 in ?? ()
#13 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()

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.

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

More information about the mono-bugs mailing list