[Mono-bugs] [Bug 80258][Nor] Changed - SIGSEGV during class initialization

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Dec 17 20:44:23 EST 2006


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 luke at quinane.id.au.

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

--- shadow/80258	2006-12-15 13:39:36.000000000 -0500
+++ shadow/80258.tmp.26775	2006-12-17 20:44:23.000000000 -0500
@@ -3,21 +3,21 @@
 Version: 1.2
 OS: unknown
 OS Details: 
 Status: REOPENED   
 Resolution: 
 Severity: Unknown
-Priority: Wishlist
+Priority: Normal
 Component: misc
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: luke at quinane.id.au               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Typeload vs FileNotFound exceptions
+Summary: SIGSEGV during class initialization
 
 Description of Problem:
 If an assembly fails to load during class initialization the runtime tries
 to deference a null pointer (object.c line 987). This causes the runtime to
 crash.
 
@@ -112,6 +112,21 @@
 
 ------- Additional Comments From lupus at ximian.com  2006-12-15 13:39 -------
 Throwing or not an execption in this case is still down to subtle
 implementation details (that is, ignoring failing instance fields when
 just a static method is executed). So, this difference will remain
 unless a major app happens to depend on this specific behaviour.
+
+------- Additional Comments From luke at quinane.id.au  2006-12-17 20:44 -------
+The main problem is not which exception the runtime raises but rather
+that it gets segv trying to dereference a null pointer. Here is the
+problem code in mono_class_create_runtime_vtable (object.c):
+
+if ((cm = class->vtable [i])) {
+	if (mono_method_signature (cm)->generic_param_count)
+		vt->vtable [i] = cm;
+	else
+		vt->vtable [i] = arch_create_jit_trampoline (cm);
+}
+
+The runtime should check the return of mono_method_signature and raise
+an exception if it is NULL.


More information about the mono-bugs mailing list