[Mono-bugs] [Bug 58325][Maj] New - mono/test pinvoke17 is hanging

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 11 May 2004 10:07:28 -0400 (EDT)


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 umuff@quark.com.

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

--- shadow/58325	2004-05-11 10:07:27.000000000 -0400
+++ shadow/58325.tmp.19736	2004-05-11 10:07:27.000000000 -0400
@@ -0,0 +1,296 @@
+Bug#: 58325
+Product: Mono: Runtime
+Version: unspecified
+OS: Mac OS X 10.3
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: umuff@quark.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mono/test pinvoke17 is hanging
+
+mono --trace --debug -v pinvoke17.exe
+Method (wrapper managed-to-native) System.Object:__icall_wrapper_mono_ldftn (intptr) emitted 
+at 0xc9918 to 0xc9a24 [pinvoke17.exe]
+Method (wrapper managed-to-native) System.Object:
+__icall_wrapper_mono_thread_get_pending_exception () emitted at 0xc9a28 to 0xc9b2c 
+[pinvoke17.exe]
+Method (wrapper runtime-invoke) System.OutOfMemoryException:.ctor (object,intptr,intptr) 
+emitted at 0xc9b30 to 0xc9c40 [pinvoke17.exe]
+Method System.OutOfMemoryException:.ctor (string) emitted at 0xc9c90 to 0xc9ce8 
+[pinvoke17.exe]
+Method System.SystemException:.ctor (string) emitted at 0xc9dc8 to 0xc9e20 [pinvoke17.exe]
+Method System.Exception:.ctor (string) emitted at 0xc9eb8 to 0xc9f6c [pinvoke17.exe]
+Method System.Object:.ctor () emitted at 0xca000 to 0xca030 [pinvoke17.exe]
+Method System.MonoType:get_FullName () emitted at 0xca038 to 0xca07c [pinvoke17.exe]
+Method (wrapper managed-to-native) System.MonoType:getFullName () emitted at 0xca110 to 
+0xca21c [pinvoke17.exe]
+Method System.Exception:set_HResult (int) emitted at 0xca220 to 0xca260 [pinvoke17.exe]
+Method (wrapper runtime-invoke) System.NullReferenceException:.ctor (object,intptr,intptr) 
+emitted at 0xca268 to 0xca378 [pinvoke17.exe]
+Method System.NullReferenceException:.ctor (string) emitted at 0xca3c8 to 0xca420 
+[pinvoke17.exe]
+Method (wrapper runtime-invoke) System.StackOverflowException:.ctor (object,intptr,intptr) 
+emitted at 0xca428 to 0xca538 [pinvoke17.exe]
+Method System.StackOverflowException:.ctor (string) emitted at 0xca588 to 0xca5c8 
+[pinvoke17.exe]
+Method (wrapper runtime-invoke) System.AppDomain:DoAssemblyLoad (object,intptr,intptr) 
+emitted at 0xcad68 to 0xcae78 [pinvoke17.exe]
+Method (wrapper managed-to-native) System.Object:__icall_wrapper_mono_object_new_fast 
+(intptr) emitted at 0xcaec8 to 0xcafd4 [pinvoke17.exe]
+Method System.AppDomain:DoAssemblyLoad (System.Reflection.Assembly) emitted at 0xcafd8 to 
+0xcb08c [pinvoke17.exe]
+Method System.MulticastDelegate:op_Equality 
+(System.MulticastDelegate,System.MulticastDelegate) emitted at 0xcb168 to 0xcb1e8 
+[pinvoke17.exe]
+Method (wrapper runtime-invoke) Test:Main (object,intptr,intptr) emitted at 0x3f9240 to 
+0x3f938c [pinvoke17.exe]
+ENTER: (wrapper runtime-invoke) Test:Main (object,intptr,intptr)() ip: 0x105c16c
+Method Test:Main () emitted at 0x3f93d8 to 0x3f972c [pinvoke17.exe]
+. ENTER: Test:Main ()() ip: 0x3f92b4
+Method System.Console:WriteLine (string) emitted at 0x3f9980 to 0x3f9a10 [pinvoke17.exe]
+Method (wrapper runtime-invoke) System.Console:.cctor (object,intptr,intptr) emitted at 
+0x3f9a18 to 0x3f9b48 [pinvoke17.exe]
+. . ENTER: (wrapper runtime-invoke) System.Console:.cctor (object,intptr,intptr)() ip: 0x1059d78
+Method (wrapper managed-to-native) System.Object:__icall_wrapper_mono_object_new_specific 
+(intptr) emitted at 0x3faac8 to 0x3fac14 [pinvoke17.exe]
+Method System.Console:.cctor () emitted at 0x3fb128 to 0x3fb5dc [pinvoke17.exe]
+. . . ENTER: System.Console:.cctor ()() ip: 0x3f9a8c
+Method (wrapper managed-to-native) System.Text.Encoding:InternalCodePage (int&) emitted at 
+0x3fb9a0 to 0x3fbaec [pinvoke17.exe]
+Method (wrapper runtime-invoke) System.Text.Encoding:.cctor (object,intptr,intptr) emitted at 
+0x3fc240 to 0x3fc370 [pinvoke17.exe]
+. . . . ENTER: (wrapper runtime-invoke) System.Text.Encoding:.cctor (object,intptr,intptr)() ip: 
+0x1059d78
+Method (wrapper managed-to-native) System.Object:__icall_wrapper_helper_stelem_ref 
+(System.Array,int,object) emitted at 0x3fc3c0 to 0x3fc50c [pinvoke17.exe]
+Method (wrapper managed-to-native) System.Object:__icall_wrapper_mono_array_new_specific 
+(intptr,int) emitted at 0x3fc510 to 0x3fc664 [pinvoke17.exe]
+Method System.Text.Encoding:.cctor () emitted at 0x3fc668 to 0x3fcbf8 [pinvoke17.exe]
+. . . . . ENTER: System.Text.Encoding:.cctor ()() ip: 0x3fc2b4
+. . . . . . ENTER: (wrapper managed-to-native) System.Object:
+__icall_wrapper_mono_array_new_specific (intptr,int)() ip: 0x3fc6a8
+. . . . . . LEAVE: (wrapper managed-to-native) System.Object:
+__icall_wrapper_mono_array_new_specific (intptr,int)[System.Object[]:0x28b28]
+. . . . . . ENTER: (wrapper managed-to-native) System.Object:__icall_wrapper_helper_stelem_ref 
+(System.Array,int,object)() ip: 0x3fc6e0
+Method (wrapper runtime-invoke) System.NullReferenceException:.ctor (object,intptr,intptr) 
+emitted at 0x3fcc00 to 0x3fcd40 [pinvoke17.exe]
+. . . . . . . ENTER: (wrapper runtime-invoke) System.NullReferenceException:.ctor 
+(object,intptr,intptr)() ip: 0x107e6e8
+Method System.NullReferenceException:.ctor () emitted at 0x3fcd90 to 0x3fce30 [pinvoke17.exe]
+. . . . . . . . ENTER: System.NullReferenceException:.ctor ()() ip: 0x3fcc84
+Method Locale:GetText (string) emitted at 0x3fcee0 to 0x3fcf54 [pinvoke17.exe]
+. . . . . . . . . ENTER: Locale:GetText (string)() ip: 0x3fcdd8
+. . . . . . . . . LEAVE: Locale:GetText (string)[STRING:0x28a80:A null value was found where an 
+object instance was required.]
+. . . . . . . . LEAVE: System.NullReferenceException:.ctor ()
+. . . . . . . LEAVE: (wrapper runtime-invoke) System.NullReferenceException:.ctor 
+(object,intptr,intptr)[OBJECT:0x0]
+EXCEPTION handling: NullReferenceException
+EXCEPTION: catch found at clause 0 of (wrapper runtime-invoke) System.Text.Encoding:.cctor 
+(object,intptr,intptr)
+. . . . . . LEAVE: (wrapper runtime-invoke) System.Text.Encoding:.cctor 
+(object,intptr,intptr)[OBJECT:0x0]
+Method (wrapper runtime-invoke) System.TypeInitializationException:.ctor (object,intptr,intptr) 
+emitted at 0x3fcfa0 to 0x3fd100 [pinvoke17.exe]
+. . . . . . ENTER: (wrapper runtime-invoke) System.TypeInitializationException:.ctor 
+(object,intptr,intptr)() ip: 0x107eecc
+Method System.TypeInitializationException:.ctor (string,System.Exception) emitted at 0x3fd150 
+to 0x3fd208 [pinvoke17.exe]
+. . . . . . . ENTER: System.TypeInitializationException:.ctor (string,System.Exception)() ip: 
+0x3fd044
+. . . . . . . . ENTER: Locale:GetText (string)() ip: 0x3fd1a0
+. . . . . . . . LEAVE: Locale:GetText (string)[STRING:0xefe80:An exception was thrown by the type 
+initializer for ]
+Method (wrapper runtime-invoke) System.String:.cctor (object,intptr,intptr) emitted at 0x3fd300 
+to 0x3fd430 [pinvoke17.exe]
+. . . . . . . . ENTER: (wrapper runtime-invoke) System.String:.cctor (object,intptr,intptr)() ip: 
+0x1059d78
+Method System.String:.cctor () emitted at 0x3fd480 to 0x3fd544 [pinvoke17.exe]
+. . . . . . . . . ENTER: System.String:.cctor ()() ip: 0x3fd374
+. . . . . . . . . . ENTER: (wrapper managed-to-native) System.Object:
+__icall_wrapper_mono_array_new_specific (intptr,int)() ip: 0x3fd4d4
+. . . . . . . . . . LEAVE: (wrapper managed-to-native) System.Object:
+__icall_wrapper_mono_array_new_specific (intptr,int)[System.Char[]:0xf0f80]
+Method System.Runtime.CompilerServices.RuntimeHelpers:InitializeArray 
+(System.Array,System.RuntimeFieldHandle) emitted at 0x3fd5e8 to 0x3fd674 [pinvoke17.exe]
+Method (wrapper runtime-invoke) System.Runtime.CompilerServices.RuntimeHelpers:.cctor 
+(object,intptr,intptr) emitted at 0x3fd768 to 0x3fd898 [pinvoke17.exe]
+. . . . . . . . . . ENTER: (wrapper runtime-invoke) 
+System.Runtime.CompilerServices.RuntimeHelpers:.cctor (object,intptr,intptr)() ip: 0x1059d78
+Method System.Runtime.CompilerServices.RuntimeHelpers:.cctor () emitted at 0x3fd8e8 to 
+0x3fd964 [pinvoke17.exe]
+. . . . . . . . . . . ENTER: System.Runtime.CompilerServices.RuntimeHelpers:.cctor ()() ip: 0x3fd7dc
+Method (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers:
+GetOffsetToStringData () emitted at 0x3fda10 to 0x3fdb54 [pinvoke17.exe]
+. . . . . . . . . . . . ENTER: (wrapper managed-to-native) 
+System.Runtime.CompilerServices.RuntimeHelpers:GetOffsetToStringData ()() ip: 0x3fd91c
+. . . . . . . . . . . . LEAVE: (wrapper managed-to-native) 
+System.Runtime.CompilerServices.RuntimeHelpers:GetOffsetToStringData ()result=12
+. . . . . . . . . . . LEAVE: System.Runtime.CompilerServices.RuntimeHelpers:.cctor ()
+. . . . . . . . . . LEAVE: (wrapper runtime-invoke) 
+System.Runtime.CompilerServices.RuntimeHelpers:.cctor (object,intptr,intptr)[OBJECT:0x0]
+. . . . . . . . . . ENTER: System.Runtime.CompilerServices.RuntimeHelpers:InitializeArray 
+(System.Array,System.RuntimeFieldHandle)() ip: 0x3fd4f0
+Method System.RuntimeFieldHandle:get_Value () emitted at 0x3fdb58 to 0x3fdbd0 
+[pinvoke17.exe]
+. . . . . . . . . . . ENTER: System.RuntimeFieldHandle:get_Value ()() ip: 0x3fd634
+. . . . . . . . . . . LEAVE: System.RuntimeFieldHandle:get_Value ()result=58809856
+Method (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers:
+InitializeArray (System.Array,intptr) emitted at 0x3fdc20 to 0x3fdd64 [pinvoke17.exe]
+. . . . . . . . . . . ENTER: (wrapper managed-to-native) 
+System.Runtime.CompilerServices.RuntimeHelpers:InitializeArray (System.Array,intptr)() ip: 
+0x3fd644
+. . . . . . . . . . . . ENTER: (wrapper runtime-invoke) System.NullReferenceException:.ctor 
+(object,intptr,intptr)() ip: 0x107e6e8
+. . . . . . . . . . . . . ENTER: System.NullReferenceException:.ctor ()() ip: 0x3fcc84
+. . . . . . . . . . . . . . ENTER: Locale:GetText (string)() ip: 0x3fcdd8
+. . . . . . . . . . . . . . LEAVE: Locale:GetText (string)[STRING:0x28a80:A null value was found where 
+an object instance was required.]
+. . . . . . . . . . . . . LEAVE: System.NullReferenceException:.ctor ()
+. . . . . . . . . . . . LEAVE: (wrapper runtime-invoke) System.NullReferenceException:.ctor 
+(object,intptr,intptr)[OBJECT:0x0]
+EXCEPTION handling: NullReferenceException
+EXCEPTION: catch found at clause 0 of (wrapper runtime-invoke) System.String:.cctor 
+(object,intptr,intptr)
+. . . . . . . . . . . LEAVE: (wrapper runtime-invoke) System.String:.cctor (object,intptr,intptr)[OBJECT:
+0x0]
+. . . . . . . . . . . ENTER: (wrapper runtime-invoke) System.TypeInitializationException:.ctor 
+(object,intptr,intptr)() ip: 0x107eecc
+. . . . . . . . . . . . ENTER: System.TypeInitializationException:.ctor (string,System.Exception)() ip: 
+0x3fd044
+. . . . . . . . . . . . . ENTER: Locale:GetText (string)() ip: 0x3fd1a0
+. . . . . . . . . . . . . LEAVE: Locale:GetText (string)[STRING:0xefe80:An exception was thrown by the 
+type initializer for ]
+Method System.String:Concat (string,string) emitted at 0x3fdd68 to 0x3fde68 [pinvoke17.exe]
+. . . . . . . . . . . . . ENTER: System.String:Concat (string,string)() ip: 0x3fd1b8
+. . . . . . . . . . . . . LEAVE: System.String:Concat (string,string)[STRING:0x26810:System.String]
+Method System.SystemException:.ctor (string,System.Exception) emitted at 0x3fdf50 to 0x3fdfe4 
+[pinvoke17.exe]
+. . . . . . . . . . . . . ENTER: System.SystemException:.ctor (string,System.Exception)() ip: 0x3fd1cc
+Method System.Exception:.ctor (string,System.Exception) emitted at 0x3fe090 to 0x3fe17c 
+[pinvoke17.exe]
+. . . . . . . . . . . . . . ENTER: System.Exception:.ctor (string,System.Exception)() ip: 0x3fdf9c
+. . . . . . . . . . . . . . LEAVE: System.Exception:.ctor (string,System.Exception)
+. . . . . . . . . . . . . LEAVE: System.SystemException:.ctor (string,System.Exception)
+. . . . . . . . . . . . LEAVE: System.TypeInitializationException:.ctor (string,System.Exception)
+. . . . . . . . . . . LEAVE: (wrapper runtime-invoke) System.TypeInitializationException:.ctor 
+(object,intptr,intptr)[OBJECT:0x0]
+EXCEPTION handling: TypeInitializationException
+Method (wrapper runtime-invoke) System.Exception:ToString (object,intptr,intptr) emitted at 
+0x3fe180 to 0x3fe2c0 [pinvoke17.exe]
+. . . . . . . . . . . ENTER: (wrapper runtime-invoke) System.Exception:ToString (object,intptr,intptr)() 
+ip: 0x105e028
+Method System.Exception:ToString () emitted at 0x3fe358 to 0x3fe5cc [pinvoke17.exe]
+. . . . . . . . . . . . ENTER: System.Exception:ToString ()() ip: 0x3fe204
+Method System.Text.StringBuilder:.ctor (string) emitted at 0x3fe6f8 to 0x3fe834 [pinvoke17.exe]
+. . . . . . . . . . . . . ENTER: System.Text.StringBuilder:.ctor (string)() ip: 0x3fe3e4
+Method System.Text.StringBuilder:.ctor (string,int,int,int) emitted at 0x3fea88 to 0x3fed7c 
+[pinvoke17.exe]
+. . . . . . . . . . . . . . ENTER: System.Text.StringBuilder:.ctor (string,int,int,int)() ip: 0x3fe7f8
+Method (wrapper managed-to-native) System.String:InternalAllocateStr (int) emitted at 0x583000 
+to 0x58314c [pinvoke17.exe]
+. . . . . . . . . . . . . . . ENTER: (wrapper managed-to-native) System.String:InternalAllocateStr (int)() 
+ip: 0x3fed04
+. . . . . . . . . . . . . . . LEAVE: (wrapper managed-to-native) System.String:InternalAllocateStr 
+(int)[STRING:0xeed80:]
+Method (wrapper managed-to-native) System.String:InternalStrcpy (string,int,string,int,int) 
+emitted at 0x5851d0 to 0x585338 [pinvoke17.exe]
+. . . . . . . . . . . . . . . ENTER: (wrapper managed-to-native) System.String:InternalStrcpy 
+(string,int,string,int,int)() ip: 0x3fed34
+. . . . . . . . . . . . . . . . ENTER: (wrapper runtime-invoke) System.NullReferenceException:.ctor 
+(object,intptr,intptr)() ip: 0x107e6e8
+. . . . . . . . . . . . . . . . . ENTER: System.NullReferenceException:.ctor ()() ip: 0x3fcc84
+. . . . . . . . . . . . . . . . . . ENTER: Locale:GetText (string)() ip: 0x3fcdd8
+. . . . . . . . . . . . . . . . . . LEAVE: Locale:GetText (string)[STRING:0x28a80:A null value was found 
+where an object instance was required.]
+. . . . . . . . . . . . . . . . . LEAVE: System.NullReferenceException:.ctor ()
+. . . . . . . . . . . . . . . . LEAVE: (wrapper runtime-invoke) System.NullReferenceException:.ctor 
+(object,intptr,intptr)[OBJECT:0x0]
+EXCEPTION handling: NullReferenceException
+. . . . . . . . . . . . . . . . ENTER: (wrapper runtime-invoke) System.Exception:ToString 
+(object,intptr,intptr)() ip: 0x105e028
+. . . . . . . . . . . . . . . . . ENTER: System.Exception:ToString ()() ip: 0x3fe204
+. . . . . . . . . . . . . . . . . . ENTER: System.Text.StringBuilder:.ctor (string)() ip: 0x3fe3e4
+. . . . . . . . . . . . . . . . . . . ENTER: System.Text.StringBuilder:.ctor (string,int,int,int)() ip: 0x3fe7f8
+. . . . . . . . . . . . . . . . . . . . ENTER: (wrapper managed-to-native) System.String:InternalAllocateStr 
+(int)() ip: 0x3fed04
+. . . . . . . . . . . . . . . . . . . . LEAVE: (wrapper managed-to-native) System.String:InternalAllocateStr 
+(int)[STRING:0x33c80:]
+. . . . . . . . . . . . . . . . . . . . ENTER: (wrapper managed-to-native) System.String:InternalStrcpy 
+(string,int,string,int,int)() ip: 0x3fed34
+
+. . . . . . LEAVE: (wrapper managed-to-native) System.Object:
+__icall_wrapper_mono_array_new_specific (intptr,int)[System.Object[]:0x28b28]
+. . . . . . ENTER: (wrapper managed-to-native) System.Object:__icall_wrapper_helper_stelem_ref 
+(System.Array,int,object)() ip: 0x3fc6e0
+
+using gdb:
+
+Program received signal EXC_BAD_ACCESS, Could not access memory.
+[Switching to process 14677 thread 0x2403]
+helper_stelem_ref (array=0x0, index=0, val=0x447008) at jit-icalls.c:80
+80              if (index >= array->max_length)
+
+(gdb) p index
+$1 = 0
+(gdb) p *array
+Cannot access memory at address 0x0
+
+(gdb) bt
+#0  helper_stelem_ref (array=0x0, index=0, val=0x447008) at jit-icalls.c:80
+#1  0x003fc484 in ?? ()
+#2  0x003fc6e0 in ?? ()
+#3  0x003fc2b4 in ?? ()
+#4  0x01059d78 in mono_runtime_class_init (vtable=0x3801f90) at object.c:201
+#5  0x0101dc94 in mono_jit_compile_method_inner (method=0x442b30, 
+target_domain=0x28f18) at mini.c:8020
+#6  0x0101da88 in mono_jit_compile_method_inner (method=0x442b30, 
+target_domain=0x28f18) at mini.c:7951
+#7  0x01048db4 in ppc_magic_trampoline (method=0x28f18, code=0x440a10, sp=0x1088b "") 
+at tramp-ppc.c:104
+#8  0x0380b8e8 in ?? ()
+#9  0x003fb17c in ?? ()
+#10 0x003f9a8c in ?? ()
+#11 0x01059d78 in mono_runtime_class_init (vtable=0x3801ae0) at object.c:201
+#12 0x0101dc94 in mono_jit_compile_method_inner (method=0x43ce60, 
+target_domain=0x28f18) at mini.c:8020
+#13 0x01048db4 in ppc_magic_trampoline (method=0x28f18, code=0x43b350, sp=0x1088b "") 
+at tramp-ppc.c:104
+#14 0x0380b8e8 in ?? ()
+#15 0x003f9430 in ?? ()
+#16 0x003f92b4 in ?? ()
+#17 0x0105c16c in mono_runtime_exec_main (method=0x43b040, args=0x31f78, exc=0x0) at 
+object.c:1446
+#18 0x0105bdc0 in mono_runtime_run_main (method=0x43b040, argc=0, argv=0xbffffafc, 
+exc=0x0) at object.c:1319
+#19 0x01078d98 in start_wrapper (data=0x3814200) at threads.c:239
+#20 0x010b73c0 in timed_thread_start_routine (args=0x43a6b0) at timed-thread.c:129
+#21 0x900247e8 in _pthread_body ()
+
+(gdb) p print_method_from_ip (0x003fc484)
+IP 0x3fc484 at offset 0xc4 of method (wrapper managed-to-native) System.Object:
+__icall_wrapper_helper_stelem_ref (System.Array,int,object) (0x3fc3c0 0x3fc50c)
+
+(gdb) p print_method_from_ip(0x003fc6e0)
+IP 0x3fc6e0 at offset 0x78 of method System.Text.Encoding:.cctor () (0x3fc668 0x3fcbf8)
+
+(gdb) l
+75      static void
+76      helper_stelem_ref (MonoArray *array, int index, MonoObject *val)
+77      {
+78              MONO_ARCH_SAVE_REGS;
+79
+80              if (index >= array->max_length)
+81                      mono_raise_exception (mono_get_exception_index_out_of_range ());
+82
+83              if (val && !mono_object_isinst (val, array->obj.vtable->klass->element_class))
+84                      mono_raise_exception (mono_get_exception_array_type_mismatch ());