[Mono-bugs] [Bug 44547][Nor] Changed - mono aborts in emit_struct_conv with failed assertion running Qt# apps
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Thu, 12 Jun 2003 12:37:50 -0400 (EDT)
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 j@bitron.ch.
http://bugzilla.ximian.com/show_bug.cgi?id=44547
--- shadow/44547 Wed Jun 11 15:51:42 2003
+++ shadow/44547.tmp.2230 Thu Jun 12 12:37:50 2003
@@ -1,14 +1,14 @@
Bug#: 44547
Product: Mono/Runtime
Version: unspecified
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: mathpup@mylinuxisp.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -50,6 +50,69 @@
Additional Information:
I will try to narrow this down a little, but historically I haven't been successful at
pinpointing these types of errors.
+
+------- Additional Comments From j@bitron.ch 2003-06-12 12:37 -------
+I have the same problem with a self-written app. It seems to be a
+problem with union-like structs. Using "LayoutStruct.Explicit" and
+multiple "FieldOffset"s with the same offset triggers the bug.
+
+Used mono version is 0.24. Mono 0.23 didn't have this bug.
+
+Extracted example:
+
+[StructLayout(LayoutKind.Sequential)]
+internal struct XClientMessageEvent
+{
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct ByteMessage
+ {
+ public sbyte b0;
+ public sbyte b1;
+ public sbyte b2;
+ public sbyte b3;
+ public sbyte b4;
+ public sbyte b5;
+ public sbyte b6;
+ public sbyte b7;
+ public sbyte b8;
+ public sbyte b9;
+ public sbyte b10;
+ public sbyte b11;
+ public sbyte b12;
+ public sbyte b13;
+ public sbyte b14;
+ public sbyte b15;
+ public sbyte b16;
+ public sbyte b17;
+ public sbyte b18;
+ public sbyte b19;
+ }
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct LongMessage
+ {
+ public int s0;
+ public int s1;
+ public int s2;
+ public int s3;
+ public int s4;
+
+ } // struct LongMessage
+ [StructLayout(LayoutKind.Explicit)]
+ internal struct Message
+ {
+ [FieldOffset(0)] public ByteMessage b;
+ [FieldOffset(0)] public LongMessage l;
+
+ } // struct Message
+
+ // Structure fields.
+ public XAnyEvent common;
+ public IntPtr message_type;
+ public int format;
+ public Message data;
+
+}
+