[Mono-bugs] [Bug 72254][Min] New - System.NullReferenceException is thrown in "mono --profile"
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 6 Feb 2005 01:55:21 -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 mei@work.email.ne.jp.
http://bugzilla.ximian.com/show_bug.cgi?id=72254
--- shadow/72254 2005-02-06 01:55:21.000000000 -0500
+++ shadow/72254.tmp.19546 2005-02-06 01:55:21.000000000 -0500
@@ -0,0 +1,89 @@
+Bug#: 72254
+Product: Mono: Runtime
+Version: 1.1
+OS: Mac OS X 10.3
+OS Details: Mac OS X version 10.3.7
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: JIT
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: mei@work.email.ne.jp
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.NullReferenceException is thrown in "mono --profile"
+
+System.NullReferenceException is thrown in "mono --profile".
+
+Steps to reproduce the problem:
+
+1. compile a Sample code.
+
+// xxx.cs
+using System;
+
+class Num
+{
+ public static char[] utoa (ulong u)
+ {
+ char[] tmp = new char [20];
+ int i = tmp.Length;
+ do {
+ tmp [--i] = (char)(u % 10 + '0');
+ } while ((u /= 10) > 0);
+
+ char [] cs = new char [tmp.Length - i];
+ Array.Copy (tmp, i, cs, 0, cs.Length);
+
+ return cs;
+ }
+}
+
+class X
+{
+ static void Main ()
+ {
+ char[] cs;
+
+ DateTime t;
+
+ t = DateTime.Now;
+ for (ulong i = 0; i < 1000000; ++i)
+ cs = Num.utoa (1234567890);
+ Console.WriteLine (DateTime.Now - t);
+ }
+}
+
+2. run profile.
+
+mono --profile xxx.exe
+
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to on instance of an object
+
+
+Expected Results:
+
+Total time spent compiling xxx methods (sec): xxxx
+...
+...
+...
+Allocation profiler
+Total mem Method
+Total memory allocated: xxx KB
+
+
+How often does this happen?
+
+
+Always.
+
+Additional Information:
+
+SVN 40202.