[Mono-bugs] [Bug 45889][Cri] New - MCS allows use of internal attributes from other assemblies
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Sun, 6 Jul 2003 13:43:54 -0400 (EDT)
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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=45889
--- shadow/45889 Sun Jul 6 13:43:54 2003
+++ shadow/45889.tmp.2329 Sun Jul 6 13:43:54 2003
@@ -0,0 +1,72 @@
+Bug#: 45889
+Product: Mono/MCS
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: XD2. Mono: cvs
+Status: NEW
+Resolution:
+Severity:
+Priority: Critical
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS allows use of internal attributes from other assemblies
+
+Description of Problem:
+MCS allows internal attributes in other assemblies to be compiled.
+
+Steps to reproduce the problem:
+using System;
+
+namespace myNs
+{
+ public class T
+ {
+ public static void Main ()
+ {
+ UnfinishedMethod ();
+ }
+
+ [MonoTODO ("not done")]
+ public static void UnfinishedMethod ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
+Note, that the MonoTODO attribute is defined as following inside our corlib:
+
+internal class MonoTODOAttribute : Attribute
+{
+// ...
+}
+
+Actual Results:
+Program throws NotImplemented exception
+
+Expected Results:
+Compile time error
+
+
+How often does this happen?
+Always.
+
+
+Additional Information:
+This is preveting System.Xml from compiling, so i am marking critical. (in
+System.Xml, there is an attribute MonoTODO in System.Xml, and it tells that
+there is a conflict, when there is not one).
+
+monodis shows the follwing il code from the assembly:
+.custom instance void class [corlib]System.MonoTODOAttribute::.ctor(stri
+ng) = (01 00 08 6E 6F 74 20 64 6F 6E 65 00 00 ) // ...not done..
+
+So it is being compiled.
+
+Also, is this a runtime bug? Shouldn't the runtime throw some sort of error
+as we are using a type that should not be accessable?