[Mono-bugs] [Bug 24257] Changed - mint segfault on linux/ppc

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
9 May 2002 02:36:00 -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 al2000@udev.org.

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

--- shadow/24257	Mon May  6 10:16:15 2002
+++ shadow/24257.tmp.7438	Wed May  8 22:36:00 2002
@@ -132,6 +132,161 @@
 Thanks.
 
 ------- Additional Comments From lupus@ximian.com  2002-05-06 10:16 -------
 Created an attachment (id=1713)
 Patch to make the ppc port handle the new string icall constructors.
 
+
+------- Additional Comments From al2000@udev.org  2002-05-08 22:35 -------
+here is what happens when i apply the patch
+-------------------------------------------
+
+It works ! at least for my hello world.
+
+But mcs.exe still segfault (elsewhere)
+      
+I get the message: Your mono runtime and corlib are out of sync.
+           
+FYI i still use the .dll from mono-0.11, but i use mono from the cvs
+2002-05-09.
+
+i grepped the output for important things.
+
+$ mint mcs.exe
+(process:1650): ** WARNING **: cant resolve internal call to
+"System.Environment::GetCommandLine()" (tested without signature also)
+PInvoke [start emiting] InitializeArray
+Delegate [start emiting] AlwaysAccept
+Delegate [start emiting] IsVirtualFilter
+PInvoke [start emiting] InternalLastIndexOf
+PInvoke [start emiting] InternalAllocateStr
+PInvoke [start emiting] InternalStrcpy
+PInvoke [start emiting] IConvNewDecoder
+PInvoke [start emiting] IConvNewEncoder
+PInvoke [start emiting] get_ConsoleError
+PInvoke [start emiting] InternalCopyTo
+PInvoke [start emiting] get_ConsoleOutput
+PInvoke [start emiting] get_ConsoleInput
+Delegate [start emiting] FilterAttribute_impl
+Delegate [start emiting] FilterName_impl
+Delegate [start emiting] FilterNameIgnoreCase_impl
+Delegate [start emiting] SignatureFilter
+PInvoke [start emiting] GetHashCode
+PInvoke [start emiting] getCurDomain
+PInvoke [start emiting] GetAssemblies
+PInvoke [start emiting] get_code_base
+PInvoke [start emiting] InternalCompare
+PInvoke [start emiting] InternalLastIndexOf
+PInvoke [start emiting] get_Chars
+PInvoke [start emiting] GetLowerBound
+PInvoke [start emiting] GetLength
+PInvoke [start emiting] GetRank
+PInvoke [start emiting] GetType
+PInvoke [start emiting] GetElementType
+PInvoke [start emiting] FastCopy
+PInvoke [start emiting] .ctor
+      stack size: 32 (20)
+       code size: 80
+           align: 0x1017ebe0 (0)
+emited code size: 88 
+PInvoke [end emiting]
+Segmentation fault
+
+
+
+$ gdb mint
+(gdb) run mcs.exe
+(...)
+PInvoke [start emiting] .ctor
+      stack size: 32 (20)
+       code size: 80
+           align: 0x1017ebe0 (0)
+emited code size: 88
+PInvoke [end emiting]
+
+Program received signal SIGSEGV, Segmentation fault.
+r
+[Switching to Thread 1024 (LWP 1626)]
+0x0fd0ca40 in malloc () from /lib/libc.so.6
+(gdb) bt
+#0  0x0fd0ca40 in malloc () from /lib/libc.so.6
+#1  0x0fd0dcfc in calloc () from /lib/libc.so.6
+#2  0x0ff4fdb0 in g_malloc0 () from /usr/lib/libglib-1.3.so.15
+#3  0x10061740 in mono_array_class_get (element_type=0x1017e334,
+rank=1) at class.c:1178
+#4  0x10029298 in mono_array_new (domain=0x100974b0,
+eclass=0x1017e290, n=3) at object.c:670
+#5  0x1001635c in ves_exec_method (frame=0x7fffe7e0) at interp.c:2850
+#6  0x100143e4 in ves_exec_method (frame=0x7fffe9c8) at interp.c:2403
+#7  0x10010278 in ves_exec_method (frame=0x7fffeb90) at interp.c:1483
+#8  0x10010278 in ves_exec_method (frame=0x7fffedb0) at interp.c:1483
+#9  0x10010278 in ves_exec_method (frame=0x7fffef98) at interp.c:1483
+#10 0x10010278 in ves_exec_method (frame=0x7ffff150) at interp.c:1483
+#11 0x10010278 in ves_exec_method (frame=0x7ffff368) at interp.c:1483
+#12 0x10010278 in ves_exec_method (frame=0x7ffff4f8) at interp.c:1483
+#13 0x10010278 in ves_exec_method (frame=0x7ffff648) at interp.c:1483
+#14 0x1000d264 in interp_mono_runtime_invoke (method=0x100efae0,
+obj=0x0, params=0x7ffff700) at interp.c:1008
+#15 0x10028560 in mono_runtime_invoke (method=0x100efae0, obj=0x0,
+params=0x7ffff700) at object.c:309
+#16 0x100287e8 in mono_runtime_exec_main (method=0x100efae0,
+args=0x100effa8) at object.c:364
+#17 0x1001b034 in ves_exec (domain=0x100974b0, assembly=0x100c5458,
+argc=0, argv=0x7ffff7ec) at interp.c:3835
+#18 0x1001b5e4 in main (argc=2, argv=0x7ffff7e4) at interp.c:3971
+#19 0x0fcb0c30 in __libc_start_main () from /lib/libc.so.6
+
+
+here is the result of your gdb commands on the UNPATCHED mint:
+--------------------------------------------------------------
+
+PInvoke [start emiting] Write
+      stack size: 32 (20)
+       code size: 88
+           align: 0x1014a708 (0)
+emited code size: 88
+PInvoke [end emiting]
+Hello World
+PInvoke [start emiting] .ctor
+      stack size: 32 (20)
+       code size: 72
+           align: 0x1014a790 (0)
+emited code size: 72
+PInvoke [end emiting]
+
+Program received signal SIGSEGV, Segmentation fault.
+[Switching to Thread 1024 (LWP 930)]
+0x100100e4 in ves_exec_method (frame=0x7ffff168) at interp.c:1449
+1449                            if (csignature->hasthis && sp->type ==
+VAL_OBJ &&
+(gdb) print *csignature
+$1 = {hasthis = 1, explicit_this = 0, call_convention = 0, ref_count = 0,
+param_count = 0, sentinelpos = 0, ret = 0x100b9df8, params = 0x100b9df4}
+(gdb) print *sp
+$2 = {data = {i = 6, l = 26038892728, f = 1.2864922352650258e-313, p =
+0x6, nati = 6, vt = {vt = 0x6, klass = 0x1009f8b8}}, type = 7}
+(gdb) print *((MonoObject *)sp->data.p)
+Cannot access memory at address 0x6
+(gdb) print g_print(dump_frame(frame))
+#0: 0x00002 callvirt   in System.IO.StreamWriter::Write ([0x6] )
+#1: 0x00007 callvirt   in System.IO.TextWriter::WriteLine ()
+#2: 0x00010 callvirt   in System.Console::WriteLine ([0x100eefc8] )
+#3: 0x00005 call       in .HelloWorld::Main ()
+$3 = 0
+(gdb) bt
+#0  0x100100e4 in ves_exec_method (frame=0x7ffff168) at interp.c:1449
+#1  0x10010278 in ves_exec_method (frame=0x7ffff358) at interp.c:1483
+#2  0x10010278 in ves_exec_method (frame=0x7ffff518) at interp.c:1483
+#3  0x10010278 in ves_exec_method (frame=0x7ffff658) at interp.c:1483
+#4  0x1000d264 in interp_mono_runtime_invoke (method=0x100eee70,
+obj=0x0, params=0x7ffff710) at interp.c:1008
+#5  0x1002851c in mono_runtime_invoke (method=0x100eee70, obj=0x0,
+params=0x7ffff710) at object.c:309
+#6  0x100287d8 in mono_runtime_exec_main (method=0x100eee70, args=0x0)
+at object.c:367
+#7  0x1001b034 in ves_exec (domain=0x10097460, assembly=0x100c5278,
+argc=0, argv=0x7ffff7fc) at interp.c:3835
+#8  0x1001b5e4 in main (argc=2, argv=0x7ffff7f4) at interp.c:3971
+#9  0x0fcb0c30 in __libc_start_main () from /lib/libc.so.6
+
+
+