https://bugzilla.novell.com/show_bug.cgi?id=654058
https://bugzilla.novell.com/show_bug.cgi?id=654058#c0 Summary: FixedBufferAttribute.Length has wrong value in fixed fields. Classification: Mono Product: Mono: Compilers Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Consider the following program, in which Foo.FieldName is a fixed-width 'char' buffer holding 32 characters: using System; using System.Runtime.CompilerServices; unsafe struct Foo { public fixed char FieldName [32]; } class Test { public static void Main () { var t = typeof(Foo); var f = t.GetField ("FieldName"); var fbas = (FixedBufferAttribute[]) f.GetCustomAttributes (typeof(FixedBufferAttribute), true); Console.WriteLine ("FixedBufferAttribute: {0}", fbas.Length); Console.WriteLine ("fieldSize = {0}", fbas [0].Length); } } Compile: gmcs /unsafe /out:ff.exe ff.cs Run: mono ff.exe FixedBufferAttribute: 1 fieldSize = 64 Compare to .NET: CSC /unsafe /out:ff-n.exe ff.cs Run on .NET: ff-n.exe FixedBufferAttribute: 1 fieldSize = 32 Note that the fieldSize value differs. Perhaps this is related to #654054? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
