[Mono-bugs] [Bug 77026][Maj] Changed - Mono 1.1.11 segfaults

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Dec 20 01:35:44 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by ed at catmur.co.uk.

http://bugzilla.ximian.com/show_bug.cgi?id=77026

--- shadow/77026	2005-12-20 01:01:21.000000000 -0500
+++ shadow/77026.tmp.28329	2005-12-20 01:35:44.000000000 -0500
@@ -170,6 +170,30 @@
 unset member is e.g. a string, it crashes.
 
 ------- Additional Comments From ed at catmur.co.uk  2005-12-20 01:01 -------
 Regression introduced by
 http://svn.myrealbox.com/viewcvs/trunk/mono/mono/metadata/marshal.c?rev=53165&r1=53010&r2=53165&diff_format=u
 (fix to bug 76733).
+
+------- Additional Comments From ed at catmur.co.uk  2005-12-20 01:35 -------
+Though, that isn't the _cause_ of the bug; it just happens that the
+msize/usize test prevents the bug being hit.
+
+The end of a trace of the testcase has:
+
+. ENTER: UnionTest:Main (string[])(0x2ae10, )
+. . ENTER: System.IntPtr:op_Explicit (int)(379213, )
+. . . ENTER: System.IntPtr:.ctor (int)(value:0xbfef4100, 379213, )
+. . . LEAVE: System.IntPtr:.ctor (int)
+. . LEAVE: System.IntPtr:op_Explicit (int)result=379213
+. . ENTER: (wrapper managed-to-native) UnionTest:srand48
+(UnionTest/OuterStruct)([4d,c9,05,00,], )
+. . . ENTER: (wrapper managed-to-native)
+System.Object:__icall_wrapper_mono_string_to_byvalstr
+(intptr,intptr,int)(0xbfef40dc, 0x5c94d, 4, )
+
+Note that 0x5c94d is 379213, which is the value of the other member of
+the union. It would appear that unions are not being marshalled
+correctly, or at least not as expected.
+
+Workaround for banshee: remove the str member of the union and code
+that references it (it's not used).


More information about the mono-bugs mailing list