[Mono-bugs] [Bug 76756][Nor] New - Runtime crash with assemblies having same basename (a.exe and a.dll, where a.exe links against a.dll)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Nov 18 18:19:58 EST 2005


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 abockover at novell.com.

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

--- shadow/76756	2005-11-18 18:19:58.000000000 -0500
+++ shadow/76756.tmp.17425	2005-11-18 18:19:58.000000000 -0500
@@ -0,0 +1,67 @@
+Bug#: 76756
+Product: Mono: Runtime
+Version: 1.1
+OS: other
+OS Details: SUSE 10.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: abockover at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Runtime crash with assemblies having same basename (a.exe and a.dll, where a.exe links against a.dll)
+
+If two assemblies have the same basename (a.exe and a.dll, a is the
+basename), and a.exe links against a.dll, the runtime will crash when a.exe
+instantiates a class in a.dll.
+
+Two things happen, depending on how the invoked class is assigned. 
+
+If the instantiation is assigned to a local variable (B b = new B()), the
+runtime will SIGSEGV with the following trace:
+
+Program received signal SIGSEGV, Segmentation fault.
+[Switching to Thread 1076079520 (LWP 30973)]
+mono_class_from_mono_type (type=0x98) at class.c:2970
+2970    class.c: No such file or directory.
+        in class.c
+(gdb) bt
+#0  mono_class_from_mono_type (type=0x98) at class.c:2970
+#1  0x0810ea91 in mono_compile_create_var (cfg=0x81f7650, type=0x98,
+    opcode=152) at mini.c:1581
+#2  0x0812b687 in mini_method_compile (method=0x81f6f90, opts=92555,
+    domain=0x21f00, run_cctors=152, compile_aot=152, parts=0) at mini.c:8506
+#3  0x0812c33b in mono_jit_compile_method_with_opt (
+    method=<value optimized out>, opt=<value optimized out>) at mini.c:9563
+#4  0x0812c6d3 in mono_jit_runtime_invoke (method=0x81f6f90, obj=0x0,
+    params=0xbffbd0a8, exc=0x0) at mini.c:9771
+#5  0x080cb402 in mono_runtime_exec_main (method=0x81f6f90, args=0x2ae10,
+    exc=0x0) at object.c:2039
+#6  0x080cdd2e in mono_runtime_run_main (method=0x81f6f90, argc=0,
+    argv=0xbffbd348, exc=0x0) at object.c:1897
+#7  0x0805d4c2 in mono_main (argc=1, argv=0xbffbd344) at driver.c:533
+#8  0x4012fea0 in __libc_start_main () from /lib/tls/libc.so.6
+#9  0x0805bf81 in _start () at start.S:119
+
+If the instantiation is not assigned (new B()), the runtime instead will
+exit with a warning:
+
+** (a.exe:31033): WARNING **: Missing method .ctor in assembly
+/home/aaron/Desktop/assembly-basename-bug/a.exe, type B
+
+** ERROR **: file mini.c: line 9575 (mono_jit_compile_method_inner): should
+not be reached
+aborting...
+
+I think this warning gives a clue... shouldn't it be looking for type B in
+a.dll, not a.exe?
+
+I found this bug today when I started to resume work on hal-sharp. My last
+commit was in mid/early July of this year. The library was "hal-sharp.dll"
+and I had a test program named "hal-sharp.exe". Whatever the latest mono
+was in July did not have this problem.


More information about the mono-bugs mailing list