[Mono-bugs] [Bug 77118][Maj] New - StackFrame is invalid on Mono
but not in Windows
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Dec 29 07:35:34 EST 2005
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 richard.torkar at htu.se.
http://bugzilla.ximian.com/show_bug.cgi?id=77118
--- shadow/77118 2005-12-29 07:35:34.000000000 -0500
+++ shadow/77118.tmp.17342 2005-12-29 07:35:34.000000000 -0500
@@ -0,0 +1,89 @@
+Bug#: 77118
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details: OS X 10.4.3
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: JIT
+AssignedTo: lupus at ximian.com
+ReportedBy: richard.torkar at htu.se
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: StackFrame is invalid on Mono but not in Windows
+
+(Dunno which component to file this under, JIT maybe Paolo?)
+
+Description of Problem:
+I have below a simple example that works on Windows .NET (1.1.4322) and
+Linux (Mono 1.1.9.2), but bails with a System.NullReferenceException on OS
+X (Mono 1.1.11).
+
+Steps to reproduce the problem:
+Compile and run the example.
+
+//
+using System;
+using System.Diagnostics;
+using System.Reflection;
+
+class Foo
+{
+ [STAThread]
+ static void Main(string[] args)
+ {
+ Foo f = new Foo();
+ f.WhatsMyName();
+ }
+
+ private void WhatsMyName()
+ {
+ StackTrace stackTrace = new StackTrace();
+ StackFrame stackFrame = stackTrace.GetFrame(1);
+ MethodBase methodBaseCallee = stackFrame.GetMethod();
+ // Displays "Callee name: Main"
+ Console.WriteLine("Callee name: {0}", methodBaseCallee.Name);
+
+ StackFrame stackFrameLocal = new StackFrame();
+ MethodBase methodBase = stackFrameLocal.GetMethod();
+ // Displays "Name of method: WhatsMyName"
+ Console.WriteLine("Name of method: {0}", methodBase.Name);
+ }
+}
+//
+
+Actual Results:
+On OS X I get a System.NullReferenceException, while on Windows and Linux I
+get the correct behaviour (i.e. the C.WriteLine() are written).
+
+Expected Results:
+Callee name: Main
+Name of method: WhatsMyName
+
+Additional Information:
+I copied the executable from Windows (compiled using csc and correctly
+running) to Linux and OS X, and ran it using mono (it fails on OS X but not
+on Linux).
+
+FYI:
+On OS X I use:
+Mono JIT compiler version 1.1.11, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+ TLS: normal
+ GC: Included Boehm (with typed GC)
+ SIGSEGV : normal
+
+On Linux I use:
+Mono JIT compiler version 1.1.9.2, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+ TLS: normal
+ GC: Included Boehm (with typed GC)
+ SIGSEGV : normal Globalization: normal
+
+And on Windows I use:
+Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
+for Microsoft (R) .NET Framework version 1.1.4322
More information about the mono-bugs
mailing list