[Mono-bugs] [Bug 75802][Nor] Changed - [PATCH] CLS + partial classes crash.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Aug 30 01:17:03 EDT 2005


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 atsushi at ximian.com.

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

--- shadow/75802	2005-08-29 23:08:21.000000000 -0400
+++ shadow/75802.tmp.19531	2005-08-30 01:17:03.000000000 -0400
@@ -48,6 +48,26 @@
 
 
 ------- Additional Comments From rharinath at novell.com  2005-08-29 23:08 -------
 Eno, 'ec' should not be null at that point.  So, your patch just
 papers over the issue.  We'll have to look higher up the backtrace to
 see who's passing down the bad 'ec'.
+
+------- Additional Comments From atsushi at ximian.com  2005-08-30 01:17 -------
+That's the exact worry I had. It's TypeContainer.DefineType()
+
+----
+	if (Parts != null) {
+		ec = null;
+		foreach (ClassPart part in Parts) {
+			part.TypeBuilder = TypeBuilder;
+			part.ptype = ptype;
+			part.ec = new EmitContext (part, Mono.CSharp.Location.Null, null,
+null, ModFlags);
+			part.ec.ContainerType = TypeBuilder;
+		}
+	} else {
+----
+
+Where we don't set ec for this TypeContainer itself. (I tried to set a
+new EmitContext here but it crashed elsewhere.)
+


More information about the mono-bugs mailing list