Bug 325132 (MONO82465) - [2.0] SIGSEGV in FieldInfo.GetCustomAttributes when using custom marshaller with object backed field
Summary: [2.0] SIGSEGV in FieldInfo.GetCustomAttributes when using custom marshaller w...
Status: RESOLVED FIXED
Alias: MONO82465
Product: Mono: Runtime
Classification: Mono
Component: interop (show other bugs)
Version: 1.2
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Massimiliano Mantione
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-17 14:45 UTC by Gert Driesen
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Repro (1.35 KB, text/plain)
2007-08-17 14:47 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:48:56 UTC


---- Reported by gert.driesen@pandora.be 2007-08-17 07:45:01 MST ----

When an custom marshaller is applied to an object typed field, then the 
following SIGSEGV is reported when using FieldInfo.GetCustomAttributes:

** ERROR **: cant marshal object as native type 2c
aborting...
Stacktrace:

  at (wrapper managed-to-native) 
System.Reflection.FieldInfo.GetUnmanagedMarshal () <0x00004>
  at (wrapper managed-to-native) 
System.Reflection.FieldInfo.GetUnmanagedMarshal () <0xffffffff>
  at System.Reflection.FieldInfo.get_UMarshal () <0x0000a>
  at System.Reflection.FieldInfo.GetPseudoCustomAttributes () <0x0004a>
  at System.MonoCustomAttrs.GetPseudoCustomAttributes 
(System.Reflection.ICustomAttributeProvider,System.Type) <0x000a3>
  at System.MonoCustomAttrs.GetCustomAttributesBase 
(System.Reflection.ICustomAttributeProvider,System.Type) <0x0002c>
  at System.MonoCustomAttrs.GetCustomAttributes 
(System.Reflection.ICustomAttributeProvider,System.Type,bool) <0x0001d>
  at System.MonoCustomAttrs.GetCustomAttributes 
(System.Reflection.ICustomAttributeProvider,bool) <0x00086>
  at System.Reflection.MonoField.GetCustomAttributes (bool) <0x0000f>
  at Program.Main () <0x00025>
  at (wrapper runtime-invoke) Program.runtime_invoke_int 
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	/home/gert/mono/install/bin/mono [0x815e75e]
	[0xffffe440]
	/lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7da3641]
	/usr/lib/libglib-2.0.so.0(g_logv+0x4ca) [0xb7f3170a]
	/usr/lib/libglib-2.0.so.0(g_log+0x29) [0xb7f31749]
	/home/gert/mono/install/bin/mono(mono_type_to_unmanaged+0x1f6) 
[0x809b6f6]
	/home/gert/mono/install/bin/mono [0x80b1f9d]
	/home/gert/mono/install/bin/mono [0x80b1c4e]
	/home/gert/mono/install/bin/mono [0x816b67c]
	[0xb7460627]
	[0xb74605eb]
	[0xb746032b]
	[0xb7460104]
	[0xb745f955]
	[0xb745f086]
	[0xb745e99f]
	[0xb745e7b0]
	[0xb745c04e]
	[0xb745bf17]
	/home/gert/mono/install/bin/mono(mono_runtime_exec_main+0x10e) 
[0x80f369e]
	/home/gert/mono/install/bin/mono(mono_runtime_run_main+0x1b9) 
[0x80f3989]
	/home/gert/mono/install/bin/mono(mono_main+0xec0) [0x805aea0]
	/home/gert/mono/install/bin/mono [0x8059ad2]
	/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc) [0xb7d8debc]
	/home/gert/mono/install/bin/mono [0x8059a21]

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 -1210620192 (LWP 13446)]
[New Thread -1220314224 (LWP 13450)]
[New Thread -1214436464 (LWP 13449)]
0xffffe410 in __kernel_vsyscall ()
  3 Thread -1214436464 (LWP 13449)  0xffffe410 in __kernel_vsyscall ()
  2 Thread -1220314224 (LWP 13450)  0xffffe410 in __kernel_vsyscall ()
  1 Thread -1210620192 (LWP 13446)  0xffffe410 in __kernel_vsyscall ()

Thread 3 (Thread -1214436464 (LWP 13449)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7eec986 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0810de81 in collection_thread (unused=0x0) at collection.c:34
#3  0xb7ee531b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7e4757e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread -1220314224 (LWP 13450)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ee95c6 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0810118f in timedwait_signal_poll_cond (cond=0xb79411dc, 
    mutex=0xb79411c4, timeout=0x0, alertable=0) at handles.c:1443
#3  0x08103c2f in _wapi_handle_timedwait_signal_handle (handle=0x404, 
    timeout=0x0, alertable=0) at handles.c:1523
#4  0x08103cac in _wapi_handle_wait_signal_handle (handle=0x404, 
alertable=0)
    at handles.c:1483
#5  0x081003cf in WaitForSingleObjectEx (handle=0x404, timeout=4294967295, 
    alertable=0) at wait.c:200
#6  0x080cc5da in finalizer_thread (unused=0x0) at gc.c:835
#7  0x080eadc4 in start_wrapper (data=0x82587c0) at threads.c:513
#8  0x0810f422 in thread_start_routine (args=0xb77ed8a0) at threads.c:264
#9  0x08121515 in GC_start_routine (arg=0x22f40) at pthread_support.c:1362
#10 0xb7ee531b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7e4757e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1210620192 (LWP 13446)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e07f59 in fork () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7eee7e4 in fork () from /lib/tls/i686/cmov/libpthread.so.0
#3  0xb7f537d9 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00000010 in ?? ()
#5  0xb7eb6128 in ?? () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7eb6150 in ?? () from /lib/tls/i686/cmov/libc.so.6
#7  0x00000020 in ?? ()
#8  0x00000000 in ?? ()
#0  0xffffe410 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.
=================================================================

To reproduce, compile the attach source code using gmcs and run it.



---- Additional Comments From gert.driesen@pandora.be 2007-08-17 07:47:05 MST ----

Created an attachment (id=172504)
Repro




---- Additional Comments From vargaz@gmail.com 2007-08-17 12:41:12 MST ----

Fixed in SVN.


Imported an attachment (id=172504)

Unknown operating system unknown. Setting to default OS "Other".