[Mono-bugs] [Bug 42123][Nor] New - Crash when fetching method attributes.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 29 Apr 2003 22:58:59 -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 miguel@ximian.com.

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

--- shadow/42123	Tue Apr 29 22:58:59 2003
+++ shadow/42123.tmp.5785	Tue Apr 29 22:58:59 2003
@@ -0,0 +1,69 @@
+Bug#: 42123
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: miguel@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Crash when fetching method attributes.
+
+Getting a method attribute fails in this case:
+
+1. Compile and install latest mcs class libraries.
+
+2. Run the attached binary produced with VisualStudio (it works fine if you
+compile with MCS).
+
+Here is the stack trace:
+
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required
+in (unmanaged) /mono/lib/libmono.so.0 [0x40088efe]
+in (unmanaged) /mono/lib/libmono.so.0(mono_custom_attrs_construct+0xb9)
+[0x40089063]
+in (unmanaged)
+/mono/lib/libmono.so.0(mono_reflection_get_custom_attrs+0x264) [0x40089915]
+in <0x0006d> 00 System.MonoCustomAttrs:from_cache
+(System.Reflection.ICustomAttributeProvider)
+in <0x0009d> 00 System.MonoCustomAttrs:GetCustomAttributes
+(System.Reflection.ICustomAttributeProvider,System.Type,bool)
+in <0x00015> 00 System.Reflection.MonoMethod:GetCustomAttributes
+(System.Type,bool)
+in <0x0004f> 00
+System.Web.Services.Protocols.SoapHttpClientProtocol:CreateMessage
+(string,object[])
+in <0x0007b> 08
+System.Web.Services.Protocols.SoapHttpClientProtocol:CreateMessage
+(string,object[])
+in <0x0002c> 00 System.Web.Services.Protocols.SoapHttpClientProtocol:Invoke
+(string,object[])
+in <0x00066> 00 client.helloworld.Service1:HelloWorld (string)
+in <0x00069> 08 client.helloworld.Service1:HelloWorld (string)
+in <0x00043> 00 client.Class1:Main (string[])
+
+The values from GDB:
+Program received signal SIGSEGV, Segmentation fault.
+[Switching to Thread 1098828864 (LWP 9950)]
+0x40088efe in create_custom_attr (image=0x80ac408, method=0x815f960,
+data=0x40136ad9 "\001", len=422) at reflection.c:4340
+4340                            prop_type = prop->get?
+prop->get->signature->ret: prop->set->signature->params
+[prop->set->signature->param_count - 1];
+
+(gdb) p prop 
+$1 = (MonoProperty *) 0x0
+(gdb) p name
+$2 = 0x8161ba8
+"System.Web.Services.Description.SoapBindingUse,System.Web.Services,
+Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
+(gdb) p attr->vtable->klass->name
+$6 = 0x40408bf4 "SoapDocumentMethodAttribute"