[Mono-bugs] [Bug 532228] New: Generic type mismatch unchecked by compiler

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Aug 18 15:39:11 EDT 2009


           Summary: Generic type mismatch unchecked by compiler
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jeremie.laval at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:
Gecko/20090804 Shiretoko/3.5.2

The crash happens when a method with a return type differing from the object's
type actually returned (both generic type) is compiled by gmcs/dmcs normally
(whereas it should error out that the two types are different).

Reproducible: Always

Steps to Reproduce:
1. Compile repro-lib.cs with gmcs /t:library /debug /out:PLinq.dll repro-lib.cs
2. Compile repro-runner.cs with gmcs /r:PLinq.dll repro-runner.cs
3. Run the resulting binary
Actual Results:  

System.Collections.Generic.IEnumerable<System.Int32>[] doesn't implement
ERROR:mini-trampolines.c:144:mono_convert_imt_slot_to_vtable_slot: code should
not be reached

  at System.Linq.QueryWhereNode`1<int>.GetEnumerables () <0xffffffff>
  at System.Linq.QueryWhereNode`1<int>.GetEnumerables () <0x0005c>
  at System.Linq.QuerySelectNode`2<int, int>.GetEnumerables () <0x0010a>
  at System.Linq.ParallelExecuter.Process<int>
(System.Linq.QueryBaseNode`1<int>,System.Action`1<int>) <0x00043>
  at System.Linq.ParallelExecuter.ProcessAndCallback<int>
(System.Linq.QueryBaseNode`1<int>,System.Action`1<int>,System.Action) <0x00047>
  at System.Linq.ParallelQueryEnumerator`1<int>..ctor
(System.Linq.QueryBaseNode`1<int>,int) <0x00123>
  at System.Linq.ParallelQuery`1<int>.GetEnumeratorInternal () <0x0003f>
() <0x0000f>
  at Foo.MainClass.Main () <0x00107>
  at (wrapper runtime-invoke) object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    /home/jeremie/mono/mono/mono/mini/mono [0x483d5c]
    /lib/libpthread.so.0 [0x7f9886e6c790]
    /lib/libc.so.6(gsignal+0x35) [0x7f98868baf15]
    /lib/libc.so.6(abort+0x180) [0x7f98868bc340]
    /usr/lib/libglib-2.0.so.0(g_assertion_message+0xfc) [0x7f98874e32ec]
    /home/jeremie/mono/mono/mono/mini/mono [0x485c10]
    /home/jeremie/mono/mono/mono/mini/mono [0x486871]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0x7f9887b41730 (LWP 4927)]
[New Thread 0x7f9885545910 (LWP 4939)]
[New Thread 0x7f9885ba6910 (LWP 4938)]
[New Thread 0x7f9886658910 (LWP 4937)]
0x00007f9886e6b70b in read () from /lib/libpthread.so.0
  4 Thread 0x7f9886658910 (LWP 4937)  0x00007f9886e68dd9 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
  3 Thread 0x7f9885ba6910 (LWP 4938)  0x00007f9886e6bf31 in nanosleep () from
  2 Thread 0x7f9885545910 (LWP 4939)  0x00007f9886e6aab1 in sem_wait () from
  1 Thread 0x7f9887b41730 (LWP 4927)  0x00007f9886e6b70b in read () from

Thread 4 (Thread 0x7f9886658910 (LWP 4937)):
#0  0x00007f9886e68dd9 in pthread_cond_wait@@GLIBC_2.3.2 () from
#1  0x000000000059e79e in GC_wait_marker () at pthread_support.c:1785
#2  0x00000000005a5ffe in GC_help_marker (my_mark_no=3) at mark.c:1116
#3  0x000000000059d48c in GC_mark_thread (id=0x0) at pthread_support.c:548
#4  0x00007f9886e6457a in start_thread () from /lib/libpthread.so.0
#5  0x00007f988695416d in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f9885ba6910 (LWP 4938)):
#0  0x00007f9886e6bf31 in nanosleep () from /lib/libpthread.so.0
#1  0x0000000000573692 in collection_thread (unused=<value optimized out>) at
#2  0x00007f9886e6457a in start_thread () from /lib/libpthread.so.0
#3  0x00007f988695416d in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f9885545910 (LWP 4939)):
#0  0x00007f9886e6aab1 in sem_wait () from /lib/libpthread.so.0
#1  0x000000000055d120 in finalizer_thread (unused=<value optimized out>) at
#2  0x0000000000540295 in start_wrapper (data=<value optimized out>) at
#3  0x000000000057f913 in thread_start_routine (args=0x1843708) at
#4  0x000000000059e401 in GC_start_routine (arg=0x7f98879b3e38) at
#5  0x00007f9886e6457a in start_thread () from /lib/libpthread.so.0
#6  0x00007f988695416d in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f9887b41730 (LWP 4927)):
#0  0x00007f9886e6b70b in read () from /lib/libpthread.so.0
#1  0x0000000000483ed3 in mono_handle_native_sigsegv (signal=<value optimized
out>, ctx=<value optimized out>) at mini-exceptions.c:1560
#2  <signal handler called>
#3  0x00007f98868baf15 in raise () from /lib/libc.so.6
#4  0x00007f98868bc340 in abort () from /lib/libc.so.6
#5  0x00007f98874e32ec in g_assertion_message () from /usr/lib/libglib-2.0.so.0
#6  0x0000000000485c10 in mono_convert_imt_slot_to_vtable_slot (slot=<value
optimized out>, regs=<value optimized out>, 
    code=<value optimized out>, method=<value optimized out>,
impl_method=0x7ffff5dcab30, need_rgctx_tramp=0x7ffff5dcab3c)
    at mini-trampolines.c:144
#7  0x0000000000486871 in mono_magic_trampoline (regs=0x7ffff5dcad58,
code=0x41f3d91c "H\213��xN\215\001ff\220�D���H\211D$0E3���", 
    arg=<value optimized out>, tramp=<value optimized out>) at
#8  0x00000000418f6168 in ?? ()
#9  0x0000000000000000 in ?? ()
#0  0x00007f9886e6b70b in read () from /lib/libpthread.so.0

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.


Expected Results:  
Compiler reporting error on compilation

Configure bugmail: http://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