Bugzilla – Bug 324048
[ARM9] Endian issues with doubles
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by lchin@erggroup.com 2007-04-13 07:15:13 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. ***Description of Problem***: There are endian problems between a compiled version of mono for arm9 and the same version for the i386. This ONLY happens when using Attribute's (System.Reflection.Attribute) NOT when storing local / constant variables. The i386 version of mono stores doubles in the same format as the c# compiler included with the 1.1 MS .NET Framework. The arm9 version of mono however, wordswaps all doubles. This means that eg. double constants defined in an i386 compiled .NET binary will end up wordswapped when run on arm9 and vice versa. ***Steps to reproduce the problem***: I've attached some code which shows the problem. - Compile under i386, run under ARM - Or Compile under ARM and run under i386 ***Actual Results***: 5 attr.long = 1 attr.double = 5.30498947741318E-315 attr.string = 3 attr.long = 2 attr.double = 5.31017013119972E-315 attr.string = 6 ***Expected Results***: 5 attr.long = 1 attr.double = 2 attr.string = 3 attr.long = 2 attr.double = 4 attr.string = 6 ***How often does this happen? *** 100% ***Additional Information***: This ONLY happens when using Attribute's (System.Reflection.Attribute) NOT when storing local / constant variables. ---- Additional Comments From lchin@erggroup.com 2007-04-13 07:16:05 MST ---- Created an attachment (id=171783) C# source which causes the error ---- Additional Comments From lchin@erggroup.com 2007-04-13 07:16:43 MST ---- Created an attachment (id=171784) The same C# source but compiled using mcs for arm9 ---- Additional Comments From lchin@erggroup.com 2007-04-13 07:19:01 MST ---- I filed this bug under the JIT, but it also affects the C# compiler as well, since compiling under ARM9 and running under i386 (using mono or the MS .NET framework) also triggers the bug. Notably, compiling and running code using the same hardware platform (all i386 or all arm9) works fine. ---- Additional Comments From lupus@ximian.com 2007-04-18 13:07:01 MST ---- Fixed in svn, thanks for the test case. Imported an attachment (id=171783) Imported an attachment (id=171784) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>linux on i386 / linux on ARM9</cf_op_sys_details> Unknown operating system other. Setting to default OS "Other".