Bugzilla – Bug 317074
[PATCH] The runtime is improperly byte ordering static arrays of enum values
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by grompf@sublimeintervention.com 2005-02-01 18:12:51 MST ---- The following testcase: using System; using System.Text; class A { enum Val { A, B, C, D } static Val[] Corrupted = { Val.A, Val.B, Val.C, Val.D, }; static void Main (string [] args) { foreach (Val v in Corrupted) Console.WriteLine ("{0}", v); } } Currenty prints: junglist:~/Documents/Development/mono/bugs plasma$ mcs test2.cs ; mono -O=-all test2.exe A 16777216 33554432 50331648 With the attached patch it prints: junglist:~/Documents/Development/mono/bugs plasma$ mcs test2.cs ; mono -O=-all test2.exe A B C D This patch also resolve ~10 failures int he corlib test suite on big endian machines. -kangaroo ---- Additional Comments From grompf@sublimeintervention.com 2005-02-01 18:13:41 MST ---- Created an attachment (id=167340) patch ---- Additional Comments From miguel@ximian.com 2005-02-01 18:18:39 MST ---- Paolo, could you review and approve this? Geoff would like this on the 1.1.4 tarballs. ---- Additional Comments From lupus@ximian.com 2005-02-02 09:14:36 MST ---- Committed to svn, thanks for the patch. Imported an attachment (id=167340) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>OSX 10.3.7</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".