[Mono-bugs] [Bug 77994][Cri] New - Assertion failure compiling simple generic code

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Apr 2 23:47:47 EDT 2006


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 perryresearch at zoot.net.nz.

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

--- shadow/77994	2006-04-02 23:47:47.000000000 -0400
+++ shadow/77994.tmp.17324	2006-04-02 23:47:47.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 77994
+Product: Mono: Compilers
+Version: 1.1
+OS: other
+OS Details: Fedora Core 4
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: perryresearch at zoot.net.nz               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Assertion failure compiling simple generic code
+
+Please fill in this template when reporting a bug, unless you know what you are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Compile:
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Swap
+{
+    class Program
+    {
+        static void Swap<T>(ref T a, ref T b)
+        {
+            T c;
+            c = a; a = b; b = c;
+        }
+
+        static void Main(string[] args)
+        {
+            int x = 1, y = 2;
+            double d = 3.2, e = 4.3;
+
+            Swap(ref x, ref y);
+            Swap(ref d, ref e);
+
+            Console.WriteLine("x = {0}, y = {1}, d = {2}, e = {3}", x, y, d, e);
+        }
+    }
+}
+
+Actual Results:
+
+
+** ERROR **: file icall.c: line 2394 (ves_icall_MonoType_get_DeclaringMethod): assertion failed: 
+(method)
+aborting...
+
+Expected Results:
+
+
+How often does this happen? 
+
+Repeatable. Works on VS2005 - not too surprising. More complex generics work on Mono as 
+well, I was writing this code to test dotGNU not Mono (dotGNU failed, so cheer up ;-))
+
+Additional Information:
+
+I'm on 1.1.13.2 according to mono --version
+
+The VS2005 .exe runs under mono - it is gmcs which barfs.


More information about the mono-bugs mailing list