[Mono-bugs] [Bug 24354] New - Certain attributes appear to crash mcs in windows

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
7 May 2002 14:58:54 -0000


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 crichton@gimp.org.

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

--- shadow/24354	Tue May  7 10:58:54 2002
+++ shadow/24354.tmp.8410	Tue May  7 10:58:54 2002
@@ -0,0 +1,57 @@
+Bug#: 24354
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: crichton@gimp.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Certain attributes appear to crash mcs in windows
+
+Recent MCS pull (May 07, 2002, 10:57 AM)
+
+On Win2K and the MS runtime, mcs crashes with the following:
+
+An unhandled exception of type 'System.ArgumentException' occurred in
+mscorlib.dll
+
+Additional information: Invalid custom attribute provided: Unrecognized
+custom attribute argument:  (garbage chars here)
+
+The code is:
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace test
+{
+        class test
+        {
+
+                [StructLayout(LayoutKind.Explicit, Size=32,
+CharSet=CharSet.Ansi)]
+                class FloatHack 
+                {
+                        [FieldOffset(0)] public float fh_float;
+                        [FieldOffset(0)] public int fh_int;
+                }
+
+                void testme(int foo)
+                {
+                        FloatHack fh = new FloatHack();
+                        fh.fh_float = foo;
+                        foo=fh.fh_int + 3;
+                }
+        }
+}
+
+command line:
+$ ~/mcs/mcs/mcs.exe test.cs --target library -o test.dll