[Mono-bugs] [Bug 547030] New: virtual extern implementation of interface methods regression.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 14 16:23:50 EDT 2009


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

User tom_hindle at sil.org added comment
http://bugzilla.novell.com/show_bug.cgi?id=547030#c532409

           Summary: virtual extern implementation of interface methods
                    regression.
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: interop
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=322542)
 --> (http://bugzilla.novell.com/attachment.cgi?id=322542)
Simple test case that implements a interface method with virtual extern

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14)
Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14

Regression caused by 141535.
------------------------------------------------------------------------
r141535 | kumpera | 2009-09-08 12:09:30 -0600 (Tue, 08 Sep 2009) | 24 lines

2009-09-08  Rodrigo Kumpera  <rkumpera at novell.com>

    Use inheritance-aware interface offsets. Inherited types use the same
offsets
    of their parents. This reduce offset duplication in case more than one type
in
    the inheritance tree explicitly implements the same interface.

    This also removes a source of vtable bubbles found in #532409. An abstract
type
    isn't required to provide abstract methods to all interfaces it implements,
which
    resulted in a bubble with the previous scheme as the child would get a
non-full
    vtable from its parent. We fail all concrete types with vtable bubbles, so
this
    should be fixed.

    This change causes an increase of 1.7% in vtable memory usage for
IronPython pystone but
    it's expected to not cause any significant increase beyond that.

    * class.c (setup_interface_offsets): Compute super class iface offsets
    first to force sharing.

    * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
    dumping only the relevant ones.

    * class.c (mono_class_setup_vtable_general): Give newslot, non final,
virtual
    methods a new slot regardless if they belong to an interface or not. This
allows
    an inherited type to override the iface method separately from the class
one.
------------------------------------------------------------------------

It seems that since -r141535 its not possible to have a virtual extern method
implement an interface method.

Attaching test case

Reproducible: Always

Steps to Reproduce:
1. Compile and Run test case
2.
3.
Actual Results:  
**
ERROR:cominterop.c:304:cominterop_get_method_interface: assertion failed: (ic)
Stacktrace:


Native stacktrace:

    /usr/local/bin/mono [0x80d6b12]
    [0xb8088410]
    /lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb7e2f098]
    /usr/lib/libglib-2.0.so.0(g_assertion_message+0x123) [0xb8013263]
    /usr/lib/libglib-2.0.so.0 [0xb801388d]
    /usr/local/bin/mono [0x810a088]
    /usr/local/bin/mono [0x810a107]
    /usr/local/bin/mono [0x810db0f]
    /usr/local/bin/mono [0x818521e]
    /usr/local/bin/mono [0x810cdb6]
    /usr/local/bin/mono [0x8187a08]
    /usr/local/bin/mono [0x808b326]
    /usr/local/bin/mono [0x806112a]
    /usr/local/bin/mono [0x8062a44]
    /usr/local/bin/mono [0x806364a]
    /usr/local/bin/mono(mono_runtime_exec_main+0xe5) [0x8112a95]
    /usr/local/bin/mono(mono_runtime_run_main+0x16b) [0x811323b]
    /usr/local/bin/mono(mono_main+0x19a5) [0x80b6dd5]
    /usr/local/bin/mono [0x805b581]
    /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7e18775]
    /usr/local/bin/mono [0x805b4b1]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0xb7dce6f0 (LWP 10997)]
[New Thread 0xb6cedb90 (LWP 11002)]
[New Thread 0xb8074b90 (LWP 10999)]
[New Thread 0xb7c93b90 (LWP 10998)]
0xb8088430 in __kernel_vsyscall ()
  4 Thread 0xb7c93b90 (LWP 10998)  0xb8088430 in __kernel_vsyscall ()
  3 Thread 0xb8074b90 (LWP 10999)  0xb8088430 in __kernel_vsyscall ()
  2 Thread 0xb6cedb90 (LWP 11002)  0xb8088430 in __kernel_vsyscall ()
  1 Thread 0xb7dce6f0 (LWP 10997)  0xb8088430 in __kernel_vsyscall ()

Thread 4 (Thread 0xb7c93b90 (LWP 10998)):
#0  0xb8088430 in __kernel_vsyscall ()
#1  0xb7f950e5 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x081ed9c9 in GC_wait_marker () at pthread_support.c:1785
#3  0x081f0a9b in GC_help_marker (my_mark_no=2) at mark.c:1116
#4  0x081ec7ad in GC_mark_thread (id=0x0) at pthread_support.c:548
#5  0xb7f914ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#6  0xb7ee649e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 3 (Thread 0xb8074b90 (LWP 10999)):
#0  0xb8088430 in __kernel_vsyscall ()
#1  0xb7f988f6 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x081dca18 in collection_thread (unused=0x0) at collection.c:34
#3  0xb7f914ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7ee649e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xb6cedb90 (LWP 11002)):
#0  0xb8088430 in __kernel_vsyscall ()
#1  0xb7f973f5 in sem_wait@@GLIBC_2.1 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08107368 in finalizer_thread (unused=0x0) at gc.c:1014
#3  0x0811c5b7 in start_wrapper (data=0x925a508) at threads.c:657
#4  0x081c91b6 in thread_start_routine (args=0x924ef74) at wthreads.c:286
#5  0x081ed65b in GC_start_routine (arg=0x26f00) at pthread_support.c:1390
#6  0xb7f914ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb7ee649e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb7dce6f0 (LWP 10997)):
#0  0xb8088430 in __kernel_vsyscall ()
#1  0xb7f980fb in read () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x080d6cb9 in mono_handle_native_sigsegv (signal=6, ctx=0xbfba4ddc)
    at /usr/include/bits/unistd.h:45
#3  <signal handler called>
#4  0xb8088430 in __kernel_vsyscall ()
#5  0xb7e2d6d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7e2f098 in abort () from /lib/tls/i686/cmov/libc.so.6
#7  0xb8013263 in IA__g_assertion_message (domain=0xb805045e "", 
    file=0x821e6f0 "cominterop.c", line=304, 
    func=0x821f160 "cominterop_get_method_interface", 
    message=0x927a278 "assertion failed: (ic)")
    at /build/buildd/glib2.0-2.20.1/glib/gtestutils.c:1301
#8  0xb801388d in IA__g_assertion_message_expr (domain=0x0, 
    file=0x821e6f0 "cominterop.c", line=304, 
    func=0x821f160 "cominterop_get_method_interface", expr=0x8299ed8 "ic")
    at /build/buildd/glib2.0-2.20.1/glib/gtestutils.c:1312
#9  0x0810a088 in cominterop_get_method_interface (method=0x9279b3c)
    at cominterop.c:304
#10 0x0810a107 in cominterop_get_com_slot_for_method (method=0x9279b3c)
    at cominterop.c:325
#11 0x0810db0f in mono_mb_emit_cominterop_call (mb=0x9279f48, sig=0x9279d64, 
    method=0x9279b3c) at cominterop.c:542
#12 0x0818521e in mono_marshal_emit_native_wrapper (image=0x9231f40, 
    mb=0x9279f48, sig=0x9279d44, piinfo=0x9279b3c, mspecs=0x92744c8, 
    func=0x0, aot=0, check_exceptions=1) at marshal.c:7628
#13 0x0810cdb6 in mono_cominterop_get_native_wrapper (method=0x9279b3c)
    at cominterop.c:818
#14 0x08187a08 in mono_marshal_get_native_wrapper (method=0x9279b3c, 
    check_exceptions=1, aot=0) at marshal.c:7791
#15 0x0808b326 in mono_method_to_ir (cfg=0x9276818, method=0x9232484, 
    start_bblock=0x9276c3c, end_bblock=0x9276cd4, return_var=0x0, 
    dont_inline=0x9229900, inline_args=0x0, inline_offset=0, 
    is_virtual_call=0) at method-to-ir.c:6196
#16 0x0806112a in mini_method_compile (method=0x9232484, opts=64055807, 
    domain=0x25e70, run_cctors=<value optimized out>, 
    compile_aot=<value optimized out>, parts=0) at mini.c:3349
#17 0x08062a44 in mono_jit_compile_method_with_opt (method=0x9232484, 
    opt=64055807, ex=0xbfba5a08) at mini.c:4085
#18 0x0806364a in mono_jit_runtime_invoke (method=0x9232484, obj=0x0, 
    params=0xbfba5a48, exc=0x0) at mini.c:4455
#19 0x08112a95 in mono_runtime_exec_main (method=0x9232484, args=0x49fd0, 
    exc=0x0) at object.c:3459
#20 0x0811323b in mono_runtime_run_main (method=0x9232484, argc=0, 
    argv=0xbfba5cbc, exc=0x0) at object.c:3239
#21 0x080b6dd5 in mono_main (argc=3, argv=0xbfba5cb4) at driver.c:987
#22 0x0805b581 in main (argc=-1, argv=0xffffffff) at main.c:34
#0  0xb8088430 in __kernel_vsyscall ()

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


The application was terminated by a signal: SIGIOT

Expected Results:  
Got Expected Exception

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