[Mono-bugs] [Bug 54295][Cri] New - Interpreter fails on PPC

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 12 Feb 2004 14:26:04 -0500 (EST)


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 panagiotis.issaris@mech.kuleuven.ac.be.

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

--- shadow/54295	2004-02-12 14:26:04.000000000 -0500
+++ shadow/54295.tmp.6006	2004-02-12 14:26:04.000000000 -0500
@@ -0,0 +1,270 @@
+Bug#: 54295
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: Debian Woody on PowerPC
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: panagiotis.issaris@mech.kuleuven.ac.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Interpreter fails on PPC
+
+Description of Problem:
+
+I have experimented with Mono a few times before, once in 2002/01 on an ARM
+ CPU, I had sent the results to a core Mono hacker. Last year I tried Mono
+on a PowerPC, more specifically, a Motorolla MPC823E running at 75MHz which
+has no FPU. 
+(mono-20030408-2315)
+
+Today, I tried the latest CVS version and noticed that it does run with the
+interpreter (mint). But simple examples using the FPU fail, the following
+test application outputs 0 when floats or doubles are used.
+
+Notice that the old mint binary still outputs *correct* results, equal to
+the results on my x86.
+
+The new JIT (mini -> mono) fails immediatly with the following message:
+"Trace/breakpoint trap"
+
+Steps to reproduce the problem:
+1. Compile the Test.cs file.
+2. Execute on a PPC without FPU
+
+
+Test.cs:
+using System;
+class Test
+{
+    public static void Main()
+    {
+        float f = 12345.6789f;
+        Console.WriteLine(f);
+        double dob = 12345.6789d;
+        Console.WriteLine(dob);
+        decimal d = 123456789.123456789m;
+        Console.WriteLine(d);
+    }
+}
+
+
+Actual Results:
+0
+0
+123456789.123456789
+
+
+Expected Results:
+12345.68
+12345.6789
+123456789.123456789
+
+How often does this happen? 
+Always.
+
+Additional Information:
+
+
+
+Part of trace when running the JIT:
+...
+Method (wrapper managed-to-native)
+System.Object:__icall_wrapper_mono_ldvirtfn (object,intptr) emitted at
+0x100a9160 to 0x100a9284 [Test.exe]
+Method (wrapper managed-to-native)
+System.Object:__icall_wrapper_mono_object_castclass (object,intptr) emitted
+at 0x100a92f8 to 0x100a941c [Test.exe]
+Method (wrapper runtime-invoke) System.OutOfMemoryException:.ctor
+(object,intptr,intptr) emitted at 0x100a9490 to 0x100a9580 [Test.exe]
+Method System.OutOfMemoryException:.ctor () emitted at 0x100a95c8 to
+0x100a9624 [Test.exe]
+Method .Locale:GetText (string) emitted at 0x100a9670 to 0x100a96a4 [Test.exe]
+Method System.SystemException:.ctor (string) emitted at 0x100a96f0 to
+0x100a9738 [Test.exe]
+Method System.Exception:.ctor (string) emitted at 0x100a9780 to 0x100a9848
+[Test.exe]
+Method System.Object:.ctor () emitted at 0x100a9890 to 0x100a98c0 [Test.exe]
+Method System.MonoType:get_FullName () emitted at 0x100a9908 to 0x100a994c
+[Test.exe]
+Method (wrapper managed-to-native) System.MonoType:getFullName () emitted
+at 0x100a9998 to 0x100a9ab0 [Test.exe]
+Method (wrapper runtime-invoke) System.AppDomain:DoAssemblyLoad
+(object,intptr,intptr) emitted at 0x100a9b28 to 0x100a9c2c [Test.exe]
+Method System.AppDomain:DoAssemblyLoad (System.Reflection.Assembly) emitted
+at 0x100a9c78 to 0x100a9d30 [Test.exe]
+Method System.MulticastDelegate:op_Equality
+(System.MulticastDelegate,System.MulticastDelegate) emitted at 0x100a9d78
+to 0x100a9e10 [Test.exe]
+Method (wrapper runtime-invoke) .Test:Main (object,intptr,intptr) emitted
+at 0x100a9e58 to 0x100a9f34 [Test.exe]
+Method .Test:Main () emitted at 0x100a9f80 to 0x100aa0a0 [Test.exe]
+Method System.Console:WriteLine (single) emitted at 0x10104608 to
+0x1010468c [Test.exe]
+Method (wrapper runtime-invoke) System.Console:.cctor
+(object,intptr,intptr) emitted at 0x101046d8 to 0x101047b4 [Test.exe]
+Method System.Console:.cctor () emitted at 0x10104800 to 0x10104ac4 [Test.exe]
+Method (wrapper managed-to-native) System.Text.Encoding:InternalCodePage ()
+emitted at 0x10104b10 to 0x10104c1c [Test.exe]
+Method (wrapper runtime-invoke) System.Text.Encoding:.cctor
+(object,intptr,intptr) emitted at 0x10104c90 to 0x10104d6c [Test.exe]
+Method System.Text.Encoding:.cctor () emitted at 0x10104db8 to 0x101052a8
+[Test.exe]
+Method (wrapper managed-to-native) System.Environment:get_Platform ()
+emitted at 0x101052f0 to 0x101053fc [Test.exe]
+Method System.String:ToUpper () emitted at 0x10105470 to 0x101054c8 [Test.exe]
+Method (wrapper runtime-invoke) System.String:.cctor (object,intptr,intptr)
+emitted at 0x10105510 to 0x101055ec [Test.exe]
+Method System.String:.cctor () emitted at 0x10105638 to 0x101056cc [Test.exe]
+Method System.Runtime.CompilerServices.RuntimeHelpers:InitializeArray
+(System.Array,System.RuntimeFieldHandle) emitted at 0x10105718 to
+0x1010577c [Test.exe]
+Method (wrapper runtime-invoke)
+System.Runtime.CompilerServices.RuntimeHelpers:.cctor
+(object,intptr,intptr) emitted at 0x101057c8 to 0x101058a4 [Test.exe]
+Method System.Runtime.CompilerServices.RuntimeHelpers:.cctor () emitted at
+0x101058f0 to 0x10105938 [Test.exe]
+Method (wrapper managed-to-native)
+System.Runtime.CompilerServices.RuntimeHelpers:GetOffsetToStringData ()
+emitted at 0x10105980 to 0x10105a8c [Test.exe]
+Method System.RuntimeFieldHandle:get_Value () emitted at 0x10105b00 to
+0x10105b38 [Test.exe]
+Method (wrapper managed-to-native)
+System.Runtime.CompilerServices.RuntimeHelpers:InitializeArray
+(System.Array,intptr) emitted at 0x10105b80 to 0x10105ca0 [Test.exe]
+Method System.Globalization.CultureInfo:get_CurrentCulture () emitted at
+0x10105d18 to 0x10105d60 [Test.exe]
+Method (wrapper runtime-invoke) System.Globalization.CultureInfo:.cctor
+(object,intptr,intptr) emitted at 0x10105da8 to 0x10105e84 [Test.exe]
+Method System.Globalization.CultureInfo:.cctor () emitted at 0x10105ed0 to
+0x10105f10 [Test.exe]
+Method System.Threading.Thread:get_CurrentThread () emitted at 0x10105f58
+to 0x10105f8c [Test.exe]
+Method (wrapper runtime-invoke) System.Threading.Thread:.cctor
+(object,intptr,intptr) emitted at 0x10105fd8 to 0x101060b4 [Test.exe]
+Method System.Threading.Thread:.cctor () emitted at 0x10106100 to
+0x1010613c [Test.exe]
+Method (wrapper managed-to-native)
+System.Threading.Thread:CurrentThread_internal () emitted at 0x10106188 to
+0x10106294 [Test.exe]
+Method System.Threading.Thread:get_CurrentCulture () emitted at 0x10106308
+to 0x1010649c [Test.exe]
+Method System.Threading.Monitor:Enter (object) emitted at 0x101064e8 to
+0x1010656c [Test.exe]
+Method (wrapper managed-to-native)
+System.Threading.Monitor:Monitor_try_enter (object,int) emitted at
+0x1011eca8 to 0x1011edcc [Test.exe]
+Method (wrapper managed-to-native) System.Threading.Thread:current_lcid ()
+emitted at 0x1011ee40 to 0x1011ef4c [Test.exe]
+Method System.Globalization.CultureInfo:.ctor (int) emitted at 0x1011efc0
+to 0x1011f00c [Test.exe]
+Method System.Globalization.CultureInfo:.ctor (int,bool) emitted at
+0x1011f058 to 0x1011f14c [Test.exe]
+Method System.Globalization.CultureInfo:ConstructInvariant (bool) emitted
+at 0x1011f198 to 0x1011f30c [Test.exe]
+Method System.Globalization.NumberFormatInfo:.ctor () emitted at 0x1011f358
+to 0x1011f398 [Test.exe]
+Method System.Globalization.NumberFormatInfo:.ctor (int) emitted at
+0x1011f3e0 to 0x1011f6cc [Test.exe]
+Method System.Globalization.DateTimeFormatInfo:.ctor () emitted at
+0x1011f718 to 0x1011f90c [Test.exe]
+Method (wrapper runtime-invoke)
+System.Globalization.DateTimeFormatInfo:.cctor (object,intptr,intptr)
+emitted at 0x1011f958 to 0x1011fa34 [Test.exe]
+Method System.Globalization.DateTimeFormatInfo:.cctor () emitted at
+0x1011fa80 to 0x1011ffd8 [Test.exe]
+Method System.Globalization.GregorianCalendar:.ctor () emitted at
+0x10120020 to 0x10120060 [Test.exe]
+Method System.Globalization.GregorianCalendar:.ctor
+(System.Globalization.GregorianCalendarTypes) emitted at 0x101200a8 to
+0x101201e8 [Test.exe]
+Method System.Globalization.Calendar:.ctor () emitted at 0x10120230 to
+0x10120284 [Test.exe]
+Method System.Globalization.GregorianCalendar:set_CalendarType
+(System.Globalization.GregorianCalendarTypes) emitted at 0x101202d0 to
+0x10120310 [Test.exe]
+Method System.Globalization.TextInfo:.ctor () emitted at 0x10120358 to
+0x10120394 [Test.exe]
+Method System.Threading.Monitor:Exit (object) emitted at 0x101203e0 to
+0x1012045c [Test.exe]
+Method (wrapper managed-to-native) System.Threading.Monitor:Monitor_exit
+(object) emitted at 0x101204a8 to 0x101205bc [Test.exe]
+Method (wrapper managed-to-native) System.String:InternalToUpper
+(System.Globalization.CultureInfo) emitted at 0x10120630 to 0x10120754
+[Test.exe]
+Method System.String:Replace (char,char) emitted at 0x101207c8 to
+0x10120824 [Test.exe]
+Method (wrapper managed-to-native) System.String:InternalReplace
+(char,char) emitted at 0x10120870 to 0x101209a0 [Test.exe]
+Method System.String:IndexOf (string) emitted at 0x10120a18 to 0x10120a78
+[Test.exe]
+Method System.String:IndexOf (string,int,int) emitted at 0x1013d938 to
+0x1013dad8 [Test.exe]
+Method System.Globalization.CultureInfo:get_CompareInfo () emitted at
+0x1013db20 to 0x1013dc04 [Test.exe]
+Method System.Globalization.CompareInfo:.ctor (int) emitted at 0x1013dc50
+to 0x1013dcc8 [Test.exe]
+Method .CultureMap:lcid_to_icuname (int) emitted at 0x1013dd10 to
+0x1013de88 [Test.exe]
+Method (wrapper runtime-invoke) .CultureMap:.cctor (object,intptr,intptr)
+emitted at 0x1013ded0 to 0x1013dfac [Test.exe]
+Method .CultureMap:.cctor () emitted at 0x101e9fc8 to 0x101f2b10 [Test.exe]
+Method System.Collections.CaseInsensitiveHashCodeProvider:get_Default ()
+emitted at 0x1013dff8 to 0x1013e034 [Test.exe]
+Method (wrapper runtime-invoke)
+System.Collections.CaseInsensitiveHashCodeProvider:.cctor
+(object,intptr,intptr) emitted at 0x1013e080 to 0x1013e15c [Test.exe]
+Method System.Collections.CaseInsensitiveHashCodeProvider:.cctor () emitted
+at 0x1013e1a8 to 0x1013e20c [Test.exe]
+Method System.Collections.CaseInsensitiveHashCodeProvider:.ctor () emitted
+at 0x1013e258 to 0x1013e294 [Test.exe]
+Method System.Globalization.CultureInfo:get_InvariantCulture () emitted at
+0x1013e2e0 to 0x1013e3ec [Test.exe]
+Method System.Collections.CaseInsensitiveComparer:.ctor
+(System.Globalization.CultureInfo) emitted at 0x1013e438 to 0x1013e4c4
+[Test.exe]
+Method System.Collections.Hashtable:.ctor
+(System.Collections.IHashCodeProvider,System.Collections.IComparer) emitted
+at 0x1013e510 to 0x1013e57c [Test.exe]
+Method (wrapper runtime-invoke) System.Collections.Hashtable:.cctor
+(object,intptr,intptr) emitted at 0x1013e5c8 to 0x1013e6a4 [Test.exe]
+Method System.Collections.Hashtable:.cctor () emitted at 0x1013e6f0 to
+0x1013e784 [Test.exe]
+Method System.Collections.Hashtable:.ctor
+(int,single,System.Collections.IHashCodeProvider,System.Collections.IComparer)
+emitted at 0x1013e7d0 to 0x1013ea70 [Test.exe]
+Method System.Single:IsNaN (single) emitted at 0x1013eab8 to 0x1013eb10
+[Test.exe]
+Method System.Collections.Hashtable:ToPrime (int) emitted at 0x1013eb58 to
+0x1013ec58 [Test.exe]
+Method System.Collections.Hashtable:SetTable
+(System.Collections.Hashtable/Slot[]) emitted at 0x1013eca0 to 0x1013ed30
+[Test.exe]
+Method System.Collections.Hashtable:AdjustThreshold () emitted at
+0x1013ed78 to 0x1013ee2c [Test.exe]
+Method System.Collections.Hashtable:set_hcp
+(System.Collections.IHashCodeProvider) emitted at 0x1013ee78 to 0x1013eeb8
+[Test.exe]
+Method System.Collections.Hashtable:set_comparer
+(System.Collections.IComparer) emitted at 0x1013ef00 to 0x1013ef40 [Test.exe]
+Method .CultureMap:.ctor (string,string,string,int,int,int) emitted at
+0x1013ef88 to 0x1013f024 [Test.exe]
+Method System.Collections.Hashtable:Add (object,object) emitted at
+0x1013f070 to 0x1013f0cc [Test.exe]
+Method System.Collections.Hashtable:PutImpl (object,object,bool) emitted at
+0x1013f118 to 0x1013f670 [Test.exe]
+Method System.Collections.Hashtable:GetHash (object) emitted at 0x1013f6b8
+to 0x1013f76c [Test.exe]
+Method System.Collections.Hashtable:get_hcp () emitted at 0x1013f7b8 to
+0x1013f7f0 [Test.exe]
+Method System.Collections.CaseInsensitiveHashCodeProvider:GetHashCode
+(object) emitted at 0x1014ab00 to 0x1014ac98 [Test.exe]
+Method System.Int32:GetHashCode () emitted at 0x1014ace0 to 0x1014ad18
+[Test.exe]
+Trace/breakpoint trap