[Mono-bugs] [Bug 79069][Wis] New - Assembly.GetExecutingAssembly() incorrect behaviour

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 13 12:56:25 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 vslugovsky at yandex.ru.


--- shadow/79069	2006-08-13 12:56:24.000000000 -0400
+++ shadow/79069.tmp.4922	2006-08-13 12:56:24.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 79069
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: vslugovsky at yandex.ru               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Assembly.GetExecutingAssembly() incorrect behaviour
+System.Reflection.Assembly.GetExecutingAssembly() works incorrectly when
+being invoked using reflection.
+ Test code:
+MethodInfo mi =
+new Type[] {});
+Assembly ass = (Assembly)(mi.Invoke(null, null));
+ With M$ .NET Framework, both output lines are identical.
+ Mono 1.1.15 and shows different assemblies: first is correct
+(current executable), and second is always a path to mscorlib.dll;
+ This is due to the implementation of the
+ves_icall_System_Reflection_Assembly_GetExecutingAssembly in
+mono/metadata/icall.c, which refers to the last managed method call. This
+is definetely an inappropriate way to deal with the case of
+reflection-managed calls.

More information about the mono-bugs mailing list