зеркало из https://github.com/mono/mail-archives.git
227 строки
8.5 KiB
HTML
227 строки
8.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 477447] New: Exception thrown while compiling code with nested anonymous delegates containing closures
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20477447%5D%20New%3A%20Exception%20thrown%20while%20compiling%20code%0A%20with%20nested%20anonymous%20delegates%20containing%20closures&In-Reply-To=">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="086250.html">
|
|
<LINK REL="Next" HREF="086240.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 477447] New: Exception thrown while compiling code with nested anonymous delegates containing closures</H1>
|
|
<B>bugzilla_noreply at novell.com</B>
|
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20477447%5D%20New%3A%20Exception%20thrown%20while%20compiling%20code%0A%20with%20nested%20anonymous%20delegates%20containing%20closures&In-Reply-To="
|
|
TITLE="[Mono-bugs] [Bug 477447] New: Exception thrown while compiling code with nested anonymous delegates containing closures">bugzilla_noreply at novell.com
|
|
</A><BR>
|
|
<I>Wed Feb 18 16:52:20 EST 2009</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="086250.html">[Mono-bugs] [Bug 477438] Virtual/ownerdraw Listview cant handle >16 item
|
|
</A></li>
|
|
<LI>Next message: <A HREF="086240.html">[Mono-bugs] [Bug 477447] Exception thrown while compiling code with nested anonymous delegates containing closures
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#86230">[ date ]</a>
|
|
<a href="thread.html#86230">[ thread ]</a>
|
|
<a href="subject.html#86230">[ subject ]</a>
|
|
<a href="author.html#86230">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE><A HREF="https://bugzilla.novell.com/show_bug.cgi?id=477447">https://bugzilla.novell.com/show_bug.cgi?id=477447</A>
|
|
|
|
|
|
Summary: Exception thrown while compiling code with nested
|
|
anonymous delegates containing closures
|
|
Classification: Mono
|
|
Product: Mono: Compilers
|
|
Version: SVN
|
|
Platform: Macintosh
|
|
OS/Version: Mac OS X 10.5
|
|
Status: NEW
|
|
Severity: Major
|
|
Priority: P5 - None
|
|
Component: C#
|
|
AssignedTo: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
|
|
ReportedBy: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">dmitchell at logos.com</A>
|
|
QAContact: <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs at lists.ximian.com</A>
|
|
Found By: ---
|
|
|
|
|
|
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
|
|
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
|
|
|
|
Thus far, I have been unable to reproduce this code with a simple test case,
|
|
but I get this exception when compiling one of my projects:
|
|
|
|
Exception caught by the compiler while emitting:
|
|
Block that caused the problem begin at:
|
|
/Users/dmitchell/Code/common/DigitalLibrary/src/Libronix.DataTypes/GrammarDriven
|
|
/GrammarDrivenDataTypeBase.cs(150,98):
|
|
System.Exception: Trying to emit a local from a different ILGenerator.
|
|
Internal compiler error at
|
|
/Users/dmitchell/Code/common/DigitalLibrary/src/Libronix.DataTypes/GrammarDriven
|
|
/GrammarDrivenDataTypeBase.cs(150,82):: exception caught while emitting
|
|
MethodBuilder [<ParseStandardReferencesCore>c__AnonStorey2F::<>m__A7]
|
|
|
|
|
|
Unhandled Exception: System.Exception: Trying to emit a local from a different
|
|
ILGenerator.
|
|
at System.Reflection.Emit.ILGenerator.Emit (OpCode opcode,
|
|
System.Reflection.Emit.LocalBuilder local) [0x00000]
|
|
at Mono.CSharp.LocalTemporary.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.MemberExpr.EmitInstance (Mono.CSharp.EmitContext ec, Boolean
|
|
prepare_for_load) [0x00000]
|
|
at Mono.CSharp.FieldExpr.Emit (Mono.CSharp.EmitContext ec, Boolean
|
|
leave_copy) [0x00000]
|
|
at Mono.CSharp.HoistedVariable.Emit (Mono.CSharp.EmitContext ec, Boolean
|
|
leave_copy) [0x00000]
|
|
at Mono.CSharp.VariableReference.Emit (Mono.CSharp.EmitContext ec, Boolean
|
|
leave_copy) [0x00000]
|
|
at Mono.CSharp.VariableReference.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
|
|
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
|
|
method, System.Collections.ArrayList Arguments, Location loc, Boolean dup_args,
|
|
Boolean omit_args) [0x00000]
|
|
at Mono.CSharp.PropertyExpr.Emit (Mono.CSharp.EmitContext ec, Boolean
|
|
leave_copy) [0x00000]
|
|
at Mono.CSharp.PropertyExpr.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.ArrayAccess.LoadArrayAndArguments (Mono.CSharp.EmitContext ec)
|
|
[0x00000]
|
|
at Mono.CSharp.ArrayAccess.Emit (Mono.CSharp.EmitContext ec, Boolean
|
|
leave_copy) [0x00000]
|
|
at Mono.CSharp.ArrayAccess.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.Invocation.EmitArguments (Mono.CSharp.EmitContext ec,
|
|
System.Collections.ArrayList arguments, Boolean dup_args,
|
|
Mono.CSharp.LocalTemporary this_arg) [0x00000]
|
|
at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
|
|
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
|
|
method, System.Collections.ArrayList Arguments, Location loc, Boolean dup_args,
|
|
Boolean omit_args) [0x00000]
|
|
at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Boolean
|
|
is_base, Mono.CSharp.Expression instance_expr, System.Reflection.MethodBase
|
|
method, System.Collections.ArrayList Arguments, Location loc) [0x00000]
|
|
at Mono.CSharp.MethodGroupExpr.EmitCall (Mono.CSharp.EmitContext ec,
|
|
System.Collections.ArrayList arguments) [0x00000]
|
|
at Mono.CSharp.ExtensionMethodGroupExpr.EmitCall (Mono.CSharp.EmitContext ec,
|
|
System.Collections.ArrayList arguments) [0x00000]
|
|
at Mono.CSharp.Invocation.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.Nullable.NullCoalescingOperator.Emit (Mono.CSharp.EmitContext
|
|
ec) [0x00000]
|
|
at Mono.CSharp.Return.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.ContextualReturn.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000]
|
|
at Mono.CSharp.EmitContext.EmitResolvedTopBlock (Mono.CSharp.ToplevelBlock
|
|
block, Boolean unreachable) [0x00000]
|
|
at Mono.CSharp.EmitContext.EmitTopBlock (IMethodData md,
|
|
Mono.CSharp.ToplevelBlock block) [0x00000]
|
|
|
|
The issue occurs in an anonymous delegate three layers deep (that is, an
|
|
anonymous delegate defined within the scope of an anonymous delegate which is
|
|
itself defined in the scope of a third anonymous delegate) that refers to a
|
|
variable defined in the outermost anonymous delegate.
|
|
|
|
Reproducible: Couldn't Reproduce
|
|
|
|
Steps to Reproduce:
|
|
1. Attempt to compile code affected by this bug.
|
|
2.
|
|
3.
|
|
Actual Results:
|
|
gmcs crashes with the exception listed in the details
|
|
|
|
Expected Results:
|
|
gmcs should compile the code.
|
|
|
|
--
|
|
Configure bugmail: <A HREF="https://bugzilla.novell.com/userprefs.cgi?tab=email">https://bugzilla.novell.com/userprefs.cgi?tab=email</A>
|
|
------- You are receiving this mail because: -------
|
|
You are the QA contact for the bug.
|
|
You are the assignee for the bug.
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="086250.html">[Mono-bugs] [Bug 477438] Virtual/ownerdraw Listview cant handle >16 item
|
|
</A></li>
|
|
<LI>Next message: <A HREF="086240.html">[Mono-bugs] [Bug 477447] Exception thrown while compiling code with nested anonymous delegates containing closures
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#86230">[ date ]</a>
|
|
<a href="thread.html#86230">[ thread ]</a>
|
|
<a href="subject.html#86230">[ subject ]</a>
|
|
<a href="author.html#86230">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
|
mailing list</a><br>
|
|
</body></html>
|