mail-archives/mono-bugs/2005-June/030627.html

162 строки
6.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 75320][Maj] New - [GMCS] references to static
generic fields are compiled to unverifiable code
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075320%5D%5BMaj%5D%20New%20-%20%5BGMCS%5D%20references%20to%20static%0A%09generic%20fields%20are%20compiled%20to%20unverifiable%20code&In-Reply-To=bug-75320%40chernobyl.ximian.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="030626.html">
<LINK REL="Next" HREF="030628.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 75320][Maj] New - [GMCS] references to static
generic fields are compiled to unverifiable code</H1>
<B>bugzilla-daemon at bugzilla.ximian.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%2075320%5D%5BMaj%5D%20New%20-%20%5BGMCS%5D%20references%20to%20static%0A%09generic%20fields%20are%20compiled%20to%20unverifiable%20code&In-Reply-To=bug-75320%40chernobyl.ximian.com"
TITLE="[Mono-bugs] [Bug 75320][Maj] New - [GMCS] references to static
generic fields are compiled to unverifiable code">bugzilla-daemon at bugzilla.ximian.com
</A><BR>
<I>Sun Jun 19 16:28:04 EDT 2005</I>
<P><UL>
<LI>Previous message: <A HREF="030626.html">[Mono-bugs] [Bug 74870][Maj] Changed - System.Diagnostics.Process
leaving defunct/zombie processes around
</A></li>
<LI>Next message: <A HREF="030628.html">[Mono-bugs] [Bug 74816][Maj] Changed - [PPC] monodis linked against
libmono.so isn't working (was Microsoft.VisualBasic/fixup is broken)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#30627">[ date ]</a>
<a href="thread.html#30627">[ thread ]</a>
<a href="subject.html#30627">[ subject ]</a>
<a href="author.html#30627">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>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 <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">nazgul at omega.pl.</A>
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=75320">http://bugzilla.ximian.com/show_bug.cgi?id=75320</A>
--- shadow/75320 2005-06-19 16:28:04.000000000 -0400
+++ shadow/75320.tmp.8387 2005-06-19 16:28:04.000000000 -0400
@@ -0,0 +1,88 @@
+Bug#: 75320
+Product: Mono: Compilers
+Version: 1.0
+OS:
+OS Details: mono svn 17.06.2005
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: C#
+AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
+ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">nazgul at omega.pl</A>
+QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at ximian.com</A>
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] references to static generic fields are compiled to unverifiable code
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+When I have a reference to static field in generic class from external
+library it is emitted to IL with instanciated signature - csc, MS S.R.E,
+gmcs (for references in current assembly) produces noninstanciated
+signatures of generic member references, so I assume this is according to
+the spec. But when gmcs compile reference to external lib, the created
+assembly do not work on MS.NET 2.0 Beta 2
+
+Steps to reproduce the problem:
+1. Compile gmcs tlib.cs /t:library /out:tlib.dll
+
+public class A &lt;T&gt; {
+ public static A&lt;T&gt; _N_constant_object = new A&lt;T&gt; ();
+}
+
+
+2. Compile gmcs t.cs /r:tlib.dll
+
+class B&lt;T&gt; {
+ public static B&lt;T&gt; _N_constant_object = new B&lt;T&gt; ();
+}
+
+class M {
+ static void Main () {
+ A&lt;int&gt; x = A&lt;int&gt;._N_constant_object;
+ B&lt;int&gt; y = B&lt;int&gt;._N_constant_object;
+ }
+}
+
+3. Run on MS.NET ./t.exe
+
+Actual Results:
+Unhandled Exception: System.MissingFieldException: Field not found:
+'A`1._N_constant_object'.
+ at M.Main()
+Unknown signal 79
+
+
+Expected Results:
+clear run
+
+How often does this happen?
+Always
+
+Additional Information:
+PEVerify.exe output:
+PEVerify
+.exe t.exe
+
+Microsoft (R) .NET Framework PE Verifier. Version 2.0.50215.44
+Copyright (C) Microsoft Corporation. All rights reserved.
+
+[IL]: Error: [C:\cygwin\home\nazgul\nemerle\ncc\testsuite\t.exe :
+M::Main][offset 0x00000000] Field is not visible.
+1 Error Verifying t.exe
+
+The problem can be seen in following IL:
+
+ IL_0000: ldsfld class [tlib]A`1&lt;int32&gt; class
+[tlib]A`1&lt;int32&gt;::_N_constant_object
+ IL_0005: stloc.0
+ IL_0006: ldsfld class B`1&lt;!0&gt; class B`1&lt;int32&gt;::_N_constant_object
+
+Also for external lib there should be class [tlib]A`1&lt;!0&gt; class ...
+
+
+This is a blocker for running nemerle compiler on MS.NET (because currently
+it can be currently only on mono)
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="030626.html">[Mono-bugs] [Bug 74870][Maj] Changed - System.Diagnostics.Process
leaving defunct/zombie processes around
</A></li>
<LI>Next message: <A HREF="030628.html">[Mono-bugs] [Bug 74816][Maj] Changed - [PPC] monodis linked against
libmono.so isn't working (was Microsoft.VisualBasic/fixup is broken)
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#30627">[ date ]</a>
<a href="thread.html#30627">[ thread ]</a>
<a href="subject.html#30627">[ subject ]</a>
<a href="author.html#30627">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>