[Mono-bugs] [Bug 353797] New: SIGSEGV when emitting generic method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jan 14 18:12:19 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=353797


           Summary: SIGSEGV when emitting generic method
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


I found this nice generics test case when hunting down runtime crash when
emitting generic method in compiler.

1. Grab the code from
http://blogs.msdn.com/yirutang/archive/2005/04/28/413284.aspx
2. Compile
3. Run

Actual Result:

Stacktrace:

  at (wrapper managed-to-native)
System.Reflection.MonoGenericClass.GetCorrespondingInflatedMethod
(System.Reflection.MethodInfo) <0x00004>
  at (wrapper managed-to-native)
System.Reflection.MonoGenericClass.GetCorrespondingInflatedMethod
(System.Reflection.MethodInfo) <0xffffffff>
  at System.Reflection.MonoGenericClass.GetMethod
(System.Reflection.MethodInfo) [0x00006] in
/home/marek/svn/mcs/class/corlib/System.Reflection/MonoGenericClass.cs:138
  at System.Reflection.Emit.TypeBuilder.GetMethod
(System.Type,System.Reflection.MethodInfo) [0x00000] in
/home/marek/svn/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs:1701
  at Entry.Instance () [0x00215] in /home/marek/svn/mcs/mcs/gtest-998.cs:122
  at Entry.Main () [0x00000] in /home/marek/svn/mcs/mcs/gtest-998.cs:54
  at (wrapper runtime-invoke) Entry.runtime_invoke_int
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x817ef8e]
        mono [0x807ee71]
        [0xffffe440]
        [0xb770702a]
        [0xb7706307]
        [0xb77062a6]
        [0xb76fe1d6]
        [0xb76fc250]
        [0xb76fc1bf]
        mono(mono_runtime_exec_main+0x10e) [0x80b593e]
        mono(mono_runtime_run_main+0x1ba) [0x80b6cfa]
        mono(mono_main+0xfaf) [0x805b69f]
        mono [0x805a1e2]
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7d18050]
        mono [0x805a151]

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 -1211103536 (LWP 5039)]
[New Thread -1223201904 (LWP 5041)]
[New Thread -1217414256 (LWP 5040)]
0xffffe410 in __kernel_vsyscall ()
  3 Thread -1217414256 (LWP 5040)  0xffffe410 in __kernel_vsyscall ()
  2 Thread -1223201904 (LWP 5041)  0xffffe410 in __kernel_vsyscall ()
  1 Thread -1211103536 (LWP 5039)  0xffffe410 in __kernel_vsyscall ()

Thread 3 (Thread -1217414256 (LWP 5040)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e7d9f6 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08113d21 in collection_thread (unused=0x0) at collection.c:34
#3  0xb7e7646b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7dd56de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread -1223201904 (LWP 5041)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e7a676 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08121e6f in timedwait_signal_poll_cond (cond=0xb76701dc, 
    mutex=0xb76701c4, timeout=0x0, alertable=0) at handles.c:1443
#3  0x0812490f in _wapi_handle_timedwait_signal_handle (handle=0x404, 
    timeout=0x0, alertable=0) at handles.c:1523
#4  0x0812498c in _wapi_handle_wait_signal_handle (handle=0x404, alertable=0)
    at handles.c:1483
#5  0x0812771f in WaitForSingleObjectEx (handle=0x404, timeout=4294967295, 
    alertable=0) at wait.c:200
#6  0x0811291a in finalizer_thread (unused=0x0) at gc.c:894
#7  0x080e60df in start_wrapper (data=0x8287fc0) at threads.c:586
#8  0x08120022 in thread_start_routine (args=0xb7520ba8) at threads.c:282
#9  0x08139c15 in GC_start_routine (arg=0x26f40) at pthread_support.c:1369
#10 0xb7e7646b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7dd56de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1211103536 (LWP 5039)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7dce2a1 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7eed780 in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
#3  0xb7eedb4c in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
#4  0x0817f029 in mono_handle_native_sigsegv (signal=11, ctx=0xb7bd0d0c)
    at mini-exceptions.c:1061
#5  0x0807ee71 in mono_arch_handle_altstack_exception (sigctx=0xb7bd0d0c, 
    fault_addr=0x4, stack_ovf=0) at exceptions-x86.c:854
#6  <signal handler called>
#7  0x08106eeb in ves_icall_MonoGenericClass_GetCorrespondingInflatedMethod (
    type=0x53fd8, generic=0x4fe80) at icall.c:2399
#8  0xb770702a in ?? ()
#9  0x00053fd8 in ?? ()
#10 0x0004fe80 in ?? ()
#11 0x0823bdf0 in ?? ()
#12 0x0823bdf1 in ?? ()
#13 0xb7d006cc in ?? ()
#14 0x082a8a2c in ?? ()
#15 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.
=================================================================

Aborted (core dumped)


-- 
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