[Mono-bugs] [Bug 394818] New: Type.MakeGenericType(Type[]) crashes the runtime if not matching generic argument count is passed

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 27 14:35:55 EDT 2008


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


           Summary: Type.MakeGenericType(Type[]) crashes the runtime if not
                    matching generic argument count is passed
           Product: Mono: Runtime
           Version: 1.2.6
          Platform: i686
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: meebey at meebey.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=218405)
 --> (https://bugzilla.novell.com/attachment.cgi?id=218405)
test-case to reproduce the runtime crash

Type.MakeGenericType(Type[]) crashes the Mono runtime on generic types that
don't match the generic arguments, see the attached test-case.

I tested this on Mono 1.2.6 and Mono 1.9.1 both crashes.

Here the output of the test-case:

mirco.bauer at flyinghorse:~$ mono MakeGenericType-crash.exe

** ERROR **: VAR 0 (K) cannot be expanded in this context with 0 instantiations
aborting...
Stacktrace:

  at (wrapper managed-to-native) System.Type.MakeGenericType
(System.Type,System.Type[]) <0x00004>
  at (wrapper managed-to-native) System.Type.MakeGenericType
(System.Type,System.Type[]) <0xffffffff>
  at System.Type.MakeGenericType (System.Type[]) <0x000d8>
  at Test.Main () <0x00030>
  at (wrapper runtime-invoke) Test.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x817f546]
        [0xb7f0c440]
        /lib/tls/i686/cmov/libc.so.6(abort+0x109) [0xb7d0ffb9]
        /usr/lib/libglib-2.0.so.0(g_logv+0x454) [0xb7e90074]
        /usr/lib/libglib-2.0.so.0(g_log+0x29) [0xb7e900a9]
        mono [0x80c0a22]
        mono(mono_class_inflate_generic_type+0x14) [0x80c1ba4]
        mono [0x80d6ed5]
        mono [0x80c0a30]
        mono(mono_class_inflate_generic_type+0x14) [0x80c1ba4]
        mono [0x80c39c6]
        mono [0x80faeab]
        mono [0x80e1df2]
        [0xb785b7e2]
        [0xb785b421]
        [0xb785b259]
        [0xb785b1be]
        mono(mono_runtime_exec_main+0xb8) [0x80f4908]
        mono(mono_runtime_run_main+0x1b4) [0x80f5d54]
        mono(mono_main+0xfbf) [0x8059ddf]
        mono [0x8058932]
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xc8) [0xb7cfaea8]
        mono [0x8058881]

Debug info from gdb:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1211218240 (LWP 7402)]
[New Thread -1221772368 (LWP 7404)]
[New Thread -1215976528 (LWP 7403)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb7f0c410 in ?? ()
  3 Thread -1215976528 (LWP 7403)  0xb7f0c410 in ?? ()
  2 Thread -1221772368 (LWP 7404)  0xb7f0c410 in ?? ()
  1 Thread -1211218240 (LWP 7402)  0xb7f0c410 in ?? ()

Thread 3 (Thread -1215976528 (LWP 7403)):
#0  0xb7f0c410 in ?? ()
#1  0xb785a458 in ?? ()
#2  0x0821ce80 in ?? ()
#3  0x00000000 in ?? ()

Thread 2 (Thread -1221772368 (LWP 7404)):
#0  0xb7f0c410 in ?? ()
#1  0xb72d32a8 in ?? ()
#2  0x00000001 in ?? ()
#3  0x00000000 in ?? ()

Thread 1 (Thread -1211218240 (LWP 7402)):
#0  0xb7f0c410 in ?? ()
#1  0xbfc3740c in ?? ()
#2  0x00000000 in ?? ()
#0  0xb7f0c410 in ?? ()


=================================================================
Got a SIGABRT 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
mirco.bauer at flyinghorse:~$


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