[Mono-bugs] [Bug 82095][Nor] New - GetExecutingAssembly reports the wrong assembly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 13 14:25:38 EDT 2007


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 billholmes54 at gmail.com.

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

--- shadow/82095	2007-07-13 14:25:38.000000000 -0400
+++ shadow/82095.tmp.20818	2007-07-13 14:25:38.000000000 -0400
@@ -0,0 +1,65 @@
+Bug#: 82095
+Product: Mono: Runtime
+Version: 1.2
+OS: other
+OS Details: Fedora 4 x86_64
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: billholmes54 at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: GetExecutingAssembly reports the wrong assembly
+
+Description of Problem:
+System.Reflection.Assembly.GetExecutingAssembly with threading and other
+obscure conditions reports the wrong assembly.  This only occurs on
+Linux64.  Linux and Windows 32 do not show this problem.
+
+Steps to reproduce the problem:
+1.  gmcs run.cs (attached)
+2.  mono run.exe
+3.  see comments in cs file for different variations
+
+Actual Results: Output
+run, Version=0.0.0.0, Culture=neutral
+run, Version=0.0.0.0, Culture=neutral
+mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+Expected Results: Output
+run, Version=0.0.0.0, Culture=neutral
+run, Version=0.0.0.0, Culture=neutral
+run, Version=0.0.0.0, Culture=neutral
+run, Version=0.0.0.0, Culture=neutral
+run, Version=0.0.0.0, Culture=neutral
+run, Version=0.0.0.0, Culture=neutral
+
+I did try and locate this problem and attempt to report my findings;
+however this code is very foreign to me.  If anyone who looks at this wants
+to point me in another direction so I can maybe flush out more details
+please fell free to do so.
+
+I have debugged this as far as I can with my limited ability and I have
+identified the problem to be located at mono_jit_walk_stack_from_ctx in
+mini-exceptions.c.  I can not seem to find what specifically is causing the
+problem.
+
+There is a while statement on line 313 that is breaking the loop too early.
+ The program will execute into this loop once and the second time around
+the loop the MonoContext (ctx) appears to be past the end of the stack. 
+Therefore the method returns too early and returns GetExecutingAssembly as
+the method.  If you happen to skip line 313 (while statement) in gdb until
+the method returns on line 330 the correct method will be returned.
+
+I dug some more into mono_arch_find_jit_info and found that MonoLMF’s
+(obtained from mono_get_lmf) ebp appears to be pointing to a stack address
+from another thread.  This is where I am really lost and may already be
+talking nonsense.  I can not track where this register is updated.


More information about the mono-bugs mailing list