[Mono-bugs] [Bug 523149] New: Defining a COM interop that returns a System.Guid Asserts on JIT compilation for a native->managed call.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jul 17 13:17:56 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=523149
Summary: Defining a COM interop that returns a System.Guid
Asserts on JIT compilation for a native->managed call.
Classification: Mono
Product: Mono: Runtime
Version: SVN
Platform: x86
OS/Version: Ubuntu
Status: NEW
Severity: Normal
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=305897)
--> (http://bugzilla.novell.com/attachment.cgi?id=305897)
Test interop definition thats a Guid
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11
// Returning a Guid doesn't work:
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType=MethodCodeType.Runtime)]
System.Guid get_MakeObjFromText([MarshalAs(UnmanagedType.BStr)] string
bstrText, [MarshalAs(UnmanagedType.Interface)] object _selDst, out int _odt);
// However having it as an out param does work
[MethodImpl(MethodImplOptions.InternalCall,
MethodCodeType=MethodCodeType.Runtime)]
void get_MakeObjFromText([MarshalAs(UnmanagedType.BStr)] string bstrText,
[MarshalAs(UnmanagedType.Interface)] object _selDst, out int _odt, out Guid g);
Attaching Sample code showing issue.
Assert happens:
0x08170262 in mono_method_get_wrapper_data (method=0x884c18c, id=6)
at loader.c:1924
id is 6 but array only has 4 items in it.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Actual Results:
Before
After
Before
**
ERROR:loader.c:1924:mono_method_get_wrapper_data: assertion failed: (id <=
GPOINTER_TO_UINT (*data))
Stacktrace:
at (wrapper native-to-managed) IVwRootSite.get_MakeObjFromText
(intptr,intptr,intptr,int&,System.Guid&) <IL 0x00049, 0x00095>
at (wrapper native-to-managed) IVwRootSite.get_MakeObjFromText
(intptr,intptr,intptr,int&,System.Guid&) <IL 0x00051, 0xffffffff>
at (wrapper managed-to-native) TestGuidReturns.Broken.MyFunction
(IVwRootSite) <0x00004>
at (wrapper managed-to-native) TestGuidReturns.Broken.MyFunction
(IVwRootSite) <IL 0x00040, 0xffffffff>
at TestGuidReturns.Broken.Do () [0x00000] in
/home/hindlet/TestApplyResources/TestApplyResources/ComTest.cs:78
at TestGuidReturns.Program.Main (string[]) <IL 0x00000, 0x0000f>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <IL 0x0004b, 0xffffffff>
Native stacktrace:
/usr/local/bin/mono [0x80d5652]
[0xb80b2410]
/lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb7e59098]
/usr/lib/libglib-2.0.so.0(g_assertion_message+0x123) [0xb803d263]
/usr/lib/libglib-2.0.so.0 [0xb803d88d]
/usr/local/bin/mono [0x8170262]
/usr/local/bin/mono [0x8067ec9]
/usr/local/bin/mono [0x807d9f0]
/usr/local/bin/mono [0x8060eea]
/usr/local/bin/mono [0x8062859]
/usr/local/bin/mono [0x80d7b68]
[0xb7cbe066]
/home/hindlet/TestApplyResources/TestApplyResources/bin/Debug/libSimpleCallToComObject.so(MyFunction+0x62)
[0xb6c1359e]
[0xb7116752]
[0xb71166ef]
[0xb7115290]
[0xb7115203]
/usr/local/bin/mono(mono_runtime_exec_main+0xe5) [0x81110f5]
/usr/local/bin/mono(mono_runtime_run_main+0x16b) [0x811189b]
/usr/local/bin/mono(mono_main+0x194a) [0x80b664a]
/usr/local/bin/mono [0x805b481]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7e42775]
/usr/local/bin/mono [0x805b3b1]
Debug info from gdb:
[Thread debugging using libthread_db enabled]
[New Thread 0xb7df86f0 (LWP 28893)]
[New Thread 0xb6d1bb90 (LWP 28898)]
[New Thread 0xb809eb90 (LWP 28896)]
[New Thread 0xb7cbdb90 (LWP 28894)]
0xb80b2430 in __kernel_vsyscall ()
4 Thread 0xb7cbdb90 (LWP 28894) 0xb80b2430 in __kernel_vsyscall ()
3 Thread 0xb809eb90 (LWP 28896) 0xb80b2430 in __kernel_vsyscall ()
2 Thread 0xb6d1bb90 (LWP 28898) 0xb80b2430 in __kernel_vsyscall ()
1 Thread 0xb7df86f0 (LWP 28893) 0xb80b2430 in __kernel_vsyscall ()
Thread 4 (Thread 0xb7cbdb90 (LWP 28894)):
#0 0xb80b2430 in __kernel_vsyscall ()
#1 0xb7fbf0e5 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/tls/i686/cmov/libpthread.so.0
#2 0x081eaaf9 in GC_wait_marker () at pthread_support.c:1785
#3 0x081edbcb in GC_help_marker (my_mark_no=2) at mark.c:1116
#4 0x081e98dd in GC_mark_thread (id=0x0) at pthread_support.c:548
#5 0xb7fbb4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#6 0xb7f1049e in clone () from /lib/tls/i686/cmov/libc.so.6
Thread 3 (Thread 0xb809eb90 (LWP 28896)):
#0 0xb80b2430 in __kernel_vsyscall ()
#1 0xb7fc28f6 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x081d9bc8 in collection_thread (unused=0x0) at collection.c:34
#3 0xb7fbb4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4 0xb7f1049e in clone () from /lib/tls/i686/cmov/libc.so.6
Thread 2 (Thread 0xb6d1bb90 (LWP 28898)):
#0 0xb80b2430 in __kernel_vsyscall ()
#1 0xb7fc13f5 in sem_wait@@GLIBC_2.1 ()
from /lib/tls/i686/cmov/libpthread.so.0
#2 0x08105e44 in finalizer_thread (unused=0x0) at gc.c:1013
#3 0x0811ab37 in start_wrapper (data=0x8844a98) at threads.c:643
#4 0x081c6376 in thread_start_routine (args=0x8839e54) at wthreads.c:286
#5 0x081ea78b in GC_start_routine (arg=0x26f00) at pthread_support.c:1390
#6 0xb7fbb4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7 0xb7f1049e in clone () from /lib/tls/i686/cmov/libc.so.6
Thread 1 (Thread 0xb7df86f0 (LWP 28893)):
#0 0xb80b2430 in __kernel_vsyscall ()
#1 0xb7fc20fb in read () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x080d58b6 in mono_handle_native_sigsegv (signal=6, ctx=0xbfccf11c)
at /usr/include/bits/unistd.h:45
#3 <signal handler called>
#4 0xb80b2430 in __kernel_vsyscall ()
#5 0xb7e576d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#6 0xb7e59098 in abort () from /lib/tls/i686/cmov/libc.so.6
#7 0xb803d263 in IA__g_assertion_message (domain=0xb807a45e "",
file=0x8252f20 "loader.c", line=1924,
func=0x82536d1 "mono_method_get_wrapper_data",
message=0x886a400 "assertion failed: (id <= GPOINTER_TO_UINT (*data))")
at /build/buildd/glib2.0-2.20.1/glib/gtestutils.c:1301
#8 0xb803d88d in IA__g_assertion_message_expr (domain=0x0,
file=0x8252f20 "loader.c", line=1924,
func=0x82536d1 "mono_method_get_wrapper_data",
expr=0x82530c8 "id <= GPOINTER_TO_UINT (*data)")
at /build/buildd/glib2.0-2.20.1/glib/gtestutils.c:1312
#9 0x08170262 in mono_method_get_wrapper_data (method=0x884c18c, id=6)
at loader.c:1924
#10 0x08067ec9 in mini_get_class (method=0x0, token=6, context=0x70dd)
at method-to-ir.c:4537
#11 0x0807d9f0 in mono_method_to_ir (cfg=0x886a198, method=0x884c18c,
start_bblock=0x8873fa4, end_bblock=0x887403c, return_var=0x0,
dont_inline=0x8814660, inline_args=0x0, inline_offset=0, is_virtual_call=0)
at method-to-ir.c:8337
#12 0x08060eea in mini_method_compile (method=0x884c18c, opts=64055807,
domain=0x25e70, run_cctors=<value optimized out>,
compile_aot=<value optimized out>, parts=0) at mini.c:3320
#13 0x08062859 in mono_jit_compile_method (method=0x884c18c) at mini.c:4047
#14 0x080d7b68 in mono_magic_trampoline (regs=0xbfccfbc8,
code=0xb7116825 "\203� \211E�\213E�\215e�^_���J�����h\214�\204\b��w�",
m=0x884c18c, tramp=0x0) at mini-trampolines.c:429
#15 0xb7cbe066 in ?? ()
#16 0xb6c1359e in MyFunction (ptr=0x88789f0)
at /home/hindlet/TestApplyResources/SimpleCallToComObject/CallBack.cpp:21
#17 0xb7116752 in ?? ()
#18 0xb71166ef in ?? ()
#19 0xb7115290 in ?? ()
#20 0xb7115203 in ?? ()
#21 0x081110f5 in mono_runtime_exec_main (method=0x0, args=0x49fd0, exc=0x0)
at object.c:3453
#22 0x0811189b in mono_runtime_run_main (method=0x881d41c, argc=0,
argv=0xbfccff8c, exc=0x0) at object.c:3233
#23 0x080b664a in mono_main (argc=3, argv=0xbfccff84) at driver.c:976
#24 0x0805b481 in main (argc=0, argv=0x0) at main.c:34
#0 0xb80b2430 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.
=================================================================
Expected Results:
Before
After
Before
After
--
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