[Mono-bugs] [Bug 76957][Nor] Changed - compiler crash with anonymous methods

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jan 17 01:40:05 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 miguel at ximian.com.

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

--- shadow/76957	2005-12-09 05:35:44.000000000 -0500
+++ shadow/76957.tmp.18526	2006-01-17 01:40:05.000000000 -0500
@@ -1,17 +1,17 @@
 Bug#: 76957
 Product: Mono: Compilers
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: C#
-AssignedTo: rharinath at novell.com                            
+AssignedTo: miguel at ximian.com                            
 ReportedBy: lupus at ximian.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
 Summary: compiler crash with anonymous methods
@@ -48,6 +48,33 @@
                 }
         }
 
 }
 
 The crash disappears when removing the last for loop.
+
+------- Additional Comments From miguel at ximian.com  2006-01-17 01:40 -------
+Am just dumping my findings into this bug.
+
+The problem is that the compiler assumed that everything could be
+rooted on one "scope" of captured variables, but in this case the
+topmost scope goes out of scope so the blocks are not properly aligned.
+
+This means that the "int j" ScopeInfo never gets linked into a
+"parent" which causes it to never be generated.
+
+There are a number of possible solutions:
+
+* replace the "topmost" ScopeInfo with a new artificial ScopeInfo that
+has no contents and is a common ancestor to the current "topmost" and
+the block being inserted (When we call "LinkScope").  This *might*
+produce worse code by introducing a new unnecessary scope though.
+
+* Alternatively, keep a list of "peers" besides a list of "children"
+on a ScopeInfo.  The risk here is that the pattern observed here can
+be seen elsewhere and the complexity of the code would increase.
+
+* Alternatively, eliminate "topmost" and turn that into an arraylist
+of linked scopes (peers), but this will complicate plenty of other
+pieces of code.
+
+


More information about the mono-bugs mailing list