[Mono-bugs] [Bug 324708] [Flow Analysis] goto does not call the finally block to close the iterator when leaving a foreach loop

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Feb 20 14:23:24 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=324708

User msafar at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=324708#c4


Marek Safar <msafar at novell.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
            Summary|goto does not call the finally block to close   |[Flow Analysis] goto does not call the finally
                   |the iterator when leaving a foreach loop        |block to close the iterator when leaving a
                   |                                                |foreach loop




--- Comment #4 from Marek Safar <msafar at novell.com>  2008-02-20 12:23:23 MST ---
The issue is that we emit hidden dispose section after closing foreach `}'. But
standard goto statement does not about this section. Fixing this simple case
may be easy but it's quite tricky to fix global goto jump to any instruction.

We should probably emit some helper method which gets calls when the goto
leaves the scope of any disposable iterator.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list