[Mono-bugs] [Bug 80064][Nor] New - Type.GetFields(...) must not return private fields declared in base types

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Nov 27 08:09:33 EST 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 juraj at hotfeet.ch.

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

--- shadow/80064	2006-11-27 08:09:33.000000000 -0500
+++ shadow/80064.tmp.24315	2006-11-27 08:09:33.000000000 -0500
@@ -0,0 +1,86 @@
+Bug#: 80064
+Product: Mono: Runtime
+Version: 1.2
+OS: 
+OS Details: FC6
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: juraj at hotfeet.ch               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Type.GetFields(...) must not return private fields declared in base types
+
+Type.GetFields(BindingFlags.NonPublic | BindingFlags.Public |
+BindingFlags.Instance) must not return private fields declared in base types.
+
+The following output results from running the attached test case on Mono:
+========
+Type 'SomeClass'
+prot
+priv
+pub
+protBase
+privBase      <=== this must not be listed!
+pubBase
+
+Type 'SomeBase'
+protBase
+privBase
+pubBase
+
+Type 'Object'
+
+Type 'SomeClass'
+prot
+priv
+pub
+
+Type 'SomeBase'
+protBase
+privBase
+pubBase
+
+Type 'Object'
+=========
+
+While MS.NET produces:
+=========
+Type 'SomeClass'
+prot
+priv
+pub
+protBase
+pubBase
+
+Type 'SomeBase'
+protBase
+privBase
+pubBase
+
+Type 'Object'
+
+Type 'SomeClass'
+prot
+priv
+pub
+
+Type 'SomeBase'
+protBase
+privBase
+pubBase
+
+Type 'Object'
+=========
+
+I'm using Mono from SVN.
+
+The code at fault is in /mono/mono/metadata/icalls.c
+(ves_icall_Type_GetFields_internal).
+I haven't checked the other Type.Get{Properties,Events,Members,...}
+methods, they might suffer from the same problem.


More information about the mono-bugs mailing list