[Mono-bugs] [Bug 31470][Nor] Changed - unnecessary leave after throw

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
3 Oct 2002 22:22:30 -0000


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 miguel@ximian.com.

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

--- shadow/31470	Mon Sep 30 04:40:17 2002
+++ shadow/31470.tmp.27161	Thu Oct  3 18:22:30 2002
@@ -82,6 +82,93 @@
 This is a slightly different case of bug
 http://bugzilla.ximian.com/show_bug.cgi?id=26506
 that was supposedly fixed.
 The leave instructions are automatically generated by the Reflection
 API: mcs needs to cope with that.
 
+
+------- Additional Comments From miguel@ximian.com  2002-10-03 18:22 -------
+I do not understand how MCS can cope with this.  The problem is that
+MCs has no control over the generation of those leave statements.  
+
+Now, the flow of execution will generate the throw and rethrow, why is
+the runtime staying on a loop?
+
+A stack trace from the looping mono looks like this:
+
+#0  0x40143136 in sigsuspend () from /lib/libc.so.6
+#1  0x400fca61 in __pthread_wait_for_restart_signal () from
+/lib/libpthread.so.0
+#2  0x400fe9d7 in __pthread_alt_lock () from /lib/libpthread.so.0
+#3  0x400fae3e in pthread_mutex_lock () from /lib/libpthread.so.0
+#4  0x4018f53c in free () from /lib/libc.so.6
+#5  0x40055586 in g_free () from /opt/gnome2/lib/libglib-2.0.so.0
+#6  0x400482cf in g_hash_table_size () from
+/opt/gnome2/lib/libglib-2.0.so.0
+#7  0x40047b50 in g_hash_table_insert () from
+/opt/gnome2/lib/libglib-2.0.so.0
+#8  0x080edfc4 in mono_get_method (image=0x8164420, token=100665991,
+klass=0x816b968) at loader.c:470
+#9  0x080f0e54 in mono_class_init (class=0x816b968) at class.c:853
+#10 0x080b6a79 in mono_class_vtable (domain=0x8143f60,
+class=0x816b968) at object.c:168
+#11 0x080b7e5c in mono_object_new (domain=0x8143f60, klass=0x816b968)
+at object.c:771
+#12 0x080b264a in mono_type_get_object (domain=0x8143f60,
+type=0x406004e8) at reflection.c:2916
+#13 0x080bb8f8 in ves_icall_System_Object_GetType (obj=0x8149f88) at
+icall.c:669
+#14 0x08162097 in ?? ()
+#15 0x08163ba0 in ?? ()
+#16 0x08163b53 in ?? ()
+#17 0x0809a22f in mono_jit_runtime_invoke (method=0x81a3af8,
+obj=0x8149f88, params=0x0, exc=0x0) at jit.c:307
+#18 0x080b715b in mono_runtime_invoke (method=0x81a3af8,
+obj=0x8149f88, params=0x0, exc=0x0) at object.c:365
+#19 0x080b93b7 in mono_print_unhandled_exception (exc=0x8149f88) at
+object.c:1588
+#20 0x080b79fb in mono_unhandled_exception (exc=0x8149f88) at object.c:603
+#21 0x080a90e1 in arch_handle_exception (ctx=0xbfffe894,
+obj=0x8149f88, test_only=0) at exception.c:411
+#22 0x080a6d0e in sigsegv_signal_handler (_dummy=11) at jit.c:3981
+#23 0x400fd307 in pthread_sighandler () from /lib/libpthread.so.0
+#24 <signal handler called>
+#25 0x4018f02f in chunk_alloc () from /lib/libc.so.6
+#26 0x4018e9d0 in malloc () from /lib/libc.so.6
+#27 0x40132f92 in __gconv_open () from /lib/libc.so.6
+#28 0x4013284a in iconv_open () from /lib/libc.so.6
+#29 0x4003ff0e in g_convert_error_quark () from
+/opt/gnome2/lib/libglib-2.0.so.0
+#30 0x4003ff9d in g_iconv_open () from /opt/gnome2/lib/libglib-2.0.so.0
+#31 0x4004039e in iconv_cache_bucket_new () from
+/opt/gnome2/lib/libglib-2.0.so.0
+#32 0x4004072f in g_convert () from /opt/gnome2/lib/libglib-2.0.so.0
+#33 0x40040ac4 in g_convert_with_fallback () from
+/opt/gnome2/lib/libglib-2.0.so.0
+#34 0x400575e4 in g_log () from /opt/gnome2/lib/libglib-2.0.so.0
+#35 0x40057fb6 in g_log_default_handler () from
+/opt/gnome2/lib/libglib-2.0.so.0
+#36 0x400574c7 in g_logv () from /opt/gnome2/lib/libglib-2.0.so.0
+#37 0x4005757b in g_log () from /opt/gnome2/lib/libglib-2.0.so.0
+#38 0x0809a7c1 in mono_cfg_add_successor (cfg=0x81d0d34, bb=0x81d2ddc,
+target=19) at jit.c:541
+#39 0x0809b0cf in mono_analyze_flow (cfg=0x81d0d34) at jit.c:777
+#40 0x080a6274 in mono_cfg_new (method=0x81d08a8) at jit.c:3694
+#41 0x080a6596 in mono_jit_compile_method (method=0x81d08a8) at jit.c:3788
+#42 0x080b695a in mono_compile_method (method=0x81d08a8) at object.c:120
+#43 0x0808eb52 in mono_ldftn (method=0x81d08a8) at codegen-x86.c:10678
+#44 0x081639f1 in ?? ()
+#45 0x0809a22f in mono_jit_runtime_invoke (method=0x81d08a8, obj=0x0,
+params=0xbffff63c, exc=0x0) at jit.c:307
+#46 0x080b715b in mono_runtime_invoke (method=0x81d08a8, obj=0x0,
+params=0xbffff63c, exc=0x0) at object.c:365
+---Type <return> to continue, or q <return> to quit--- 
+#47 0x080b7b29 in mono_runtime_exec_main (method=0x81d08a8,
+args=0x8146f78, exc=0x0) at object.c:647
+#48 0x080b7944 in mono_runtime_run_main (method=0x81d08a8, argc=0,
+argv=0xbffff77c, exc=0x0) at object.c:581
+#49 0x080a6c55 in mono_jit_exec (domain=0x8143f60, assembly=0x81d0868,
+argc=1, argv=0xbffff778) at jit.c:3940
+#50 0x080598bc in main (argc=2, argv=0xbffff774) at mono.c:345
+#51 0x401321c4 in __libc_start_main () from /lib/libc.so.6
+
+I do not know that this can be fixed with MCS at all